[mw-devel] MW3 r1282 - trunk/src/server

arthur at sucs.org arthur at sucs.org
Thu Nov 8 11:27:21 GMT 2012


Author: arthur
Date: 2012-11-08 11:27:21 +0000 (Thu, 08 Nov 2012)
New Revision: 1282

Modified:
   trunk/src/server/servsock.c
Log:
make the debug printout a little nicer


Modified: trunk/src/server/servsock.c
===================================================================
--- trunk/src/server/servsock.c	2012-11-08 11:24:45 UTC (rev 1281)
+++ trunk/src/server/servsock.c	2012-11-08 11:27:21 UTC (rev 1282)
@@ -227,7 +227,10 @@
 
 void process_msg(ipc_connection_t *conn, ipc_message_t *msg)
 {
-	printf("src: %X, dst: %X, Type: %4.4s, len=%d\n", msg->head.src, msg->head.dst, (char *)&msg->head.type, msg->head.len);
+	if (msg->head.type < 255)
+		printf("src: %X, dst: %X, Type: %4d, len=%d\n", msg->head.src, msg->head.dst, msg->head.type, msg->head.len);
+	else
+		printf("src: %X, dst: %X, Type: '%4.4s', len=%d\n", msg->head.src, msg->head.dst, (char *)&msg->head.type, msg->head.len);
 
 	/* client just told us who they are */
 	if (msg->head.type == FOURCC("HELO")) {




More information about the mw-devel mailing list