[mw-devel] MW3 r1304 - trunk/src
arthur at sucs.org
arthur at sucs.org
Thu Nov 29 16:59:32 GMT 2012
Author: arthur
Date: 2012-11-29 16:59:31 +0000 (Thu, 29 Nov 2012)
New Revision: 1304
Modified:
trunk/src/ipc.c
trunk/src/socket.c
Log:
a few tweaks to make sure it reconnects properly
Modified: trunk/src/ipc.c
===================================================================
--- trunk/src/ipc.c 2012-11-29 16:48:56 UTC (rev 1303)
+++ trunk/src/ipc.c 2012-11-29 16:59:31 UTC (rev 1304)
@@ -45,7 +45,10 @@
if (ipcsock->fd != -1) return;
/* we dont have anywhere to connect to yet */
- if (host == NULL) return;
+ if (host == NULL) {
+ printf("Nowhere to connect to. help.\n");
+ return;
+ }
int fd = ipcconn_connect(host);
if (fd < 0) {
@@ -75,7 +78,7 @@
outq_msg_t * oq = list_entry(pos, outq_msg_t, list);
list_del(&(oq->list));
oq->msg->refcount--;
- ipcmsg_summary("BACKLOG", oq->msg);
+ //ipcmsg_summary("BACKLOG", oq->msg);
ipcmsg_send(oq->msg, ipcsock);
free(oq);
}
@@ -85,7 +88,7 @@
void ipc_check(void)
{
/* not connected, try again */
- if (ipc_connected())
+ if (ipc_connected() <= 0)
ipc_connect(NULL);
}
Modified: trunk/src/socket.c
===================================================================
--- trunk/src/socket.c 2012-11-29 16:48:56 UTC (rev 1303)
+++ trunk/src/socket.c 2012-11-29 16:59:31 UTC (rev 1304)
@@ -73,7 +73,7 @@
new->msg->refcount++;
list_add_tail(&(new->list), &(conn->outq));
- ipcmsg_summary("QUEUE", msg);
+ //ipcmsg_summary("QUEUE", msg);
return wasempty;
}
@@ -85,8 +85,7 @@
int iovused = 0;
if (conn == NULL) {
- ipcmsg_summary("NO CONN", msg);
- abort();
+ //ipcmsg_summary("NO CONN", msg);
return;
}
if (msg == NULL) { msg_queue(msg, conn); return; }
More information about the mw-devel
mailing list