Update of /cvsroot/monetdb/MonetDB5/src/mal
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19538/src/mal

Modified Files:
      Tag: MonetDB_5-2
        mal_session.mx 
Log Message:
no sabaoth in embedded mode


Index: mal_session.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/mal/mal_session.mx,v
retrieving revision 1.143
retrieving revision 1.143.2.1
diff -u -d -r1.143 -r1.143.2.1
--- mal_session.mx      31 Aug 2007 16:54:23 -0000      1.143
+++ mal_session.mx      21 Oct 2007 16:41:52 -0000      1.143.2.1
@@ -240,8 +240,8 @@
                        *s = 0;
        }
 
-       if (database != NULL && database[0] != '\0' &&
-                       strcmp(database, GDKgetenv("gdk_dbname")) != 0)
+       if (!GDKembedded && database != NULL && database[0] != '\0' &&
+           strcmp(database, GDKgetenv("gdk_dbname")) != 0)
        {
                sabdb *stats;
                str err;
@@ -295,30 +295,32 @@
                        return;
                }
 
-               err = SABAOTHgetMyStatus(&stats);
-               if (err != MAL_SUCCEED) {
-                       /* this is kind of awful, but we need to get rid of this
-                        * message */
-                       fprintf(stderr, "!SABAOTHgetMyStatus: %s\n", err);
-                       GDKfree(err);
-                       GDKfree(command);
-                       return;
-               }
-
-               if (stats->locked == 1) {
-                       if (uid == 0) {
-                               stream_printf(fout, "#server is running in "
-                                               "maintenance mode\n");
-                       } else {
-                               stream_printf(fout, "!server is running in "
-                                               "maintenance mode, please try 
again later\n");
-                               stream_flush(fout);
-                               SABAOTHfreeStatus(&stats);
+               if (!GDKembedded) {
+                       err = SABAOTHgetMyStatus(&stats);
+                       if (err != MAL_SUCCEED) {
+                               /* this is kind of awful, but we need to get 
rid of this
+                               * message */
+                               fprintf(stderr, "!SABAOTHgetMyStatus: %s\n", 
err);
+                               GDKfree(err);
                                GDKfree(command);
                                return;
                        }
+       
+                       if (stats->locked == 1) {
+                               if (uid == 0) {
+                                       stream_printf(fout, "#server is running 
in "
+                                                       "maintenance mode\n");
+                               } else {
+                                       stream_printf(fout, "!server is running 
in "
+                                                       "maintenance mode, 
please try again later\n");
+                                       stream_flush(fout);
+                                       SABAOTHfreeStatus(&stats);
+                                       GDKfree(command);
+                                       return;
+                               }
+                       }
+                       SABAOTHfreeStatus(&stats);
                }
-               SABAOTHfreeStatus(&stats);
 
                c = MCinitClient(uid, fin, fout);
                if (c == NULL) {


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to