[mw-devel] MW3 r1278 - trunk/src

arthur at sucs.org arthur at sucs.org
Wed Nov 7 17:33:06 GMT 2012


Author: arthur
Date: 2012-11-07 17:33:06 +0000 (Wed, 07 Nov 2012)
New Revision: 1278

Modified:
   trunk/src/incoming.c
   trunk/src/ipc.c
Log:
remove nonce message, add error message


Modified: trunk/src/incoming.c
===================================================================
--- trunk/src/incoming.c	2012-11-07 17:23:59 UTC (rev 1277)
+++ trunk/src/incoming.c	2012-11-07 17:33:06 UTC (rev 1278)
@@ -455,6 +455,7 @@
 		ipcmsg_destroy(msg);
 		msg = read_socket(ipcsock, 0);
 	}
+	if (msg == NULL && ipcsock->fd == -1) fprintf(stderr, "Server disconnected.\n");
 	if (cm_flags(user->chatmode,CM_ONCHAT,CM_MODE_ANY)) set_talk_rights(); else set_rights();
 }
 

Modified: trunk/src/ipc.c
===================================================================
--- trunk/src/ipc.c	2012-11-07 17:23:59 UTC (rev 1277)
+++ trunk/src/ipc.c	2012-11-07 17:33:06 UTC (rev 1278)
@@ -35,7 +35,7 @@
 	if (fd < -1) {
 		free(ipcsock);
 		ipcsock = NULL;
-		fprintf(stderr, "Conneciton to server failed.\n");
+		fprintf(stderr, "Connection to server failed.\n");
 		return;
 	}
 
@@ -50,10 +50,8 @@
 	pid_t mypid = getpid();
 	ipc_message_t * msg = ipcmsg_create(FOURCC("HELO"), mypid);
 	ipcmsg_append(msg, &userposn, sizeof(userposn));
-	printf("Fetching nonce\n");
 	const char *nonce = get_nonce();
 	ipcmsg_append(msg, nonce, strlen(nonce));
-	printf("Sending nonce '%s'\n", nonce);
 	ipcmsg_send(msg, ipcsock);
 	ipcmsg_destroy(msg);
 }




More information about the mw-devel mailing list