Changeset: 2aae2fd0a8b0 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2aae2fd0a8b0
Modified Files:
        monetdb5/modules/mal/mal_mapi.mx
Branch: Mar2011
Log Message:

mapi: bring back connection announcements messages

Compared to Oct2010, the open connection messages have disappeared.
They got lost in the change of sabaoth into a GDK-free library.


diffs (46 lines):

diff --git a/monetdb5/modules/mal/mal_mapi.mx b/monetdb5/modules/mal/mal_mapi.mx
--- a/monetdb5/modules/mal/mal_mapi.mx
+++ b/monetdb5/modules/mal/mal_mapi.mx
@@ -258,7 +258,7 @@
 #include "mal_exception.h"
 #include "mal_interpreter.h"
 #include "mal_authorize.h"
-#include "mal_sabaoth.h"
+#include "msabaoth.h"
 #include <stream.h>
 
 #ifdef WIN32
@@ -626,7 +626,6 @@
 void SERVERannounce(struct in_addr addr, int port, str usockfile) {
        str buf;
        str host = NULL;
-       int ret = 0;
 
        if (port > 0) {
                if (addr.s_addr == INADDR_ANY) {
@@ -645,13 +644,21 @@
                                        (unsigned) ((ntohl(addr.s_addr) >> 8) & 
0xff),
                                        (unsigned) (ntohl(addr.s_addr) & 0xff));
                }
-               if ((buf = SABAOTHmarchConnection(&ret, &host, &port)) != 
MAL_SUCCEED && buf != M5OutOfMemory)
-                       GDKfree(buf);
+               if ((buf = msab_marchConnection(host, port)) != NULL)
+                       free(buf);
+               else 
+                       /* announce that we're now reachable */
+                       printf("# Listening for connection requests on "
+                                       "mapi:monetdb://%s:%i/\n", host, port);
        }
        if (usockfile != NULL) {
                port = 0;
-               if ((buf = SABAOTHmarchConnection(&ret, &usockfile, &port)) != 
MAL_SUCCEED && buf != M5OutOfMemory)
-                       GDKfree(buf);
+               if ((buf = msab_marchConnection(usockfile, port)) != NULL)
+                       free(buf);
+               else
+                       /* announce that we're now reachable */
+                       printf("# Listening for UNIX domain connection requests 
on "
+                                       "mapi:monetdb://%s\n", usockfile);
        }
 }
 
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to