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

Modified Files:
        mal_session.mx 
Log Message:
Free some more.
Fix logic to not emit misleading error messages.


Index: mal_session.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/mal/mal_session.mx,v
retrieving revision 1.139
retrieving revision 1.140
diff -u -d -r1.139 -r1.140
--- mal_session.mx      16 Aug 2007 20:00:48 -0000      1.139
+++ mal_session.mx      16 Aug 2007 20:18:27 -0000      1.140
@@ -252,30 +252,25 @@
                         * message */
                        fprintf(stderr, "!SABAOTHgetStatus: %s\n", err);
                        GDKfree(err);
+                       GDKfree(command);
                        return;
                }
 
-               if (stats != NULL &&
-                               stats->conns != NULL &&
-                               stats->conns->val != NULL)
-               {
-                       switch (stats->state) {
-                               case SABdbRunning:
-                                       stream_printf(fout, "^%s%s\n",
-                                                       stats->conns->val, 
stats->dbname);
-                                       stream_flush(fout);
-                               break;
-                               case SABdbCrashed:
-                               case SABdbInactive:
-                                       stream_printf(fout, "!database %s 
currently "
-                                                       "not available\n", 
stats->dbname);
-                                       stream_flush(fout);
-                               break;
-                               default:
-                                       fprintf(stderr, "!missing case 
statement for SABsbState\n");
-                               break;
+               if (stats != NULL) {
+                       if (stats->conns != NULL &&
+                                       stats->conns->val != NULL &&
+                                       stats->state == SABdbRunning)
+                       {
+                               stream_printf(fout, "^%s%s\n",
+                                               stats->conns->val, 
stats->dbname);
+                               stream_flush(fout);
+                       } else {
+                               stream_printf(fout, "!database %s currently "
+                                               "not available\n", 
stats->dbname);
+                               stream_flush(fout);
                        }
                        SABAOTHfreeStatus(&stats);
+                       GDKfree(command);
                        return;
                }
 


-------------------------------------------------------------------------
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