[mw-devel] MW3 r1273 - in trunk/src: . server

arthur at sucs.org arthur at sucs.org
Tue Nov 6 15:45:17 GMT 2012


Author: arthur
Date: 2012-11-06 15:45:17 +0000 (Tue, 06 Nov 2012)
New Revision: 1273

Modified:
   trunk/src/Makefile
   trunk/src/main.c
   trunk/src/server/servsock.c
Log:
dont connect to server until after we have logged in, and build server in test mode


Modified: trunk/src/Makefile
===================================================================
--- trunk/src/Makefile	2012-11-06 15:32:42 UTC (rev 1272)
+++ trunk/src/Makefile	2012-11-06 15:45:17 UTC (rev 1273)
@@ -85,6 +85,7 @@
 		svn export --force ../$$d "$(TESTDIR)/mw/$$d"; \
 	done
 	make libdir="$(TESTDIR)" localstatedir="$(TESTDIR)"
+	make -C server libdir="$(TESTDIR)" localstatedir="$(TESTDIR)"
 
 testclean: clean
 	rm -rf "$(TESTDIR)"

Modified: trunk/src/main.c
===================================================================
--- trunk/src/main.c	2012-11-06 15:32:42 UTC (rev 1272)
+++ trunk/src/main.c	2012-11-06 15:45:17 UTC (rev 1273)
@@ -602,7 +602,6 @@
 
 	close_fifo();
 	create_pipe();
-	open_incoming_fifo(targethost);
 
 	/* display all new messages for given user */
 	if (msguser_num>-1 && god_mode())
@@ -682,6 +681,9 @@
 		}
 	}
 
+	/* we need to be logged in before we connect to the server */
+	open_incoming_fifo(targethost);
+
 	if ((s_quiet(user->special) || u_god(user->status)) && qflag)
 	{
 		extern int talker_logontype;

Modified: trunk/src/server/servsock.c
===================================================================
--- trunk/src/server/servsock.c	2012-11-06 15:32:42 UTC (rev 1272)
+++ trunk/src/server/servsock.c	2012-11-06 15:45:17 UTC (rev 1273)
@@ -230,6 +230,7 @@
 	if (msg->head.type == FOURCC("HELO")) {
 		memcpy(&conn->addr, &msg->head.src, sizeof(conn->addr));
 		memcpy(&conn->user, msg->body, sizeof(conn->user));
+		printf("WHO Add: pid=%d posn=%d\n", conn->addr, conn->user);
 		who_add(conn->addr, conn->user);
 		conn->state = IPCSTATE_VALID;
 		ipcmsg_destroy(msg);




More information about the mw-devel mailing list