[mw-devel] MW3 r1228 - trunk/src/webclient

arthur at sucs.org arthur at sucs.org
Fri Nov 12 20:44:46 GMT 2010


Author: arthur
Date: 2010-11-12 20:44:46 +0000 (Fri, 12 Nov 2010)
New Revision: 1228

Modified:
   trunk/src/webclient/comms.c
   trunk/src/webclient/mwpoll.c
Log:
put the command socket in a grown up place


Modified: trunk/src/webclient/comms.c
===================================================================
--- trunk/src/webclient/comms.c	2010-10-20 00:01:33 UTC (rev 1227)
+++ trunk/src/webclient/comms.c	2010-11-12 20:44:46 UTC (rev 1228)
@@ -78,7 +78,7 @@
 		exit(1);
 	}
 	sa.sun_family = AF_UNIX;
-	snprintf(sa.sun_path, UNIX_PATH_MAX, "/tmp/mwnoddy.%d", getpid());
+	snprintf(sa.sun_path, UNIX_PATH_MAX, MSGDIR"/mwpoll.%d", getpid());
 	if (bind(command_sock, &sa, sizeof(sa))) {
 		fprintf(stderr, "Error binding %s: %s\n", sa.sun_path, strerror(errno));
 		close(command_sock);
@@ -625,7 +625,7 @@
 	char path[UNIX_PATH_MAX];
 	close(command_sock);
 	command_sock = -1;
-	snprintf(path, UNIX_PATH_MAX, "/tmp/mwnoddy.%d", getpid());
+	snprintf(path, UNIX_PATH_MAX, MSGDIR"/mwpoll.%d", getpid());
 	unlink(path);
 }
 

Modified: trunk/src/webclient/mwpoll.c
===================================================================
--- trunk/src/webclient/mwpoll.c	2010-10-20 00:01:33 UTC (rev 1227)
+++ trunk/src/webclient/mwpoll.c	2010-11-12 20:44:46 UTC (rev 1228)
@@ -160,7 +160,7 @@
 			return 1;
 		}
 		if (PQntuples(dbres) < 1) {
-			printf("Session not found\n");
+			printf("Session not found '%s'\n", passwd);
 			PQclear(dbres);
 			PQfinish(dbconn);
 			return 1;




More information about the mw-devel mailing list