Author: ab
Date: 2006-07-21 08:27:37 +0000 (Fri, 21 Jul 2006)
New Revision: 17175

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17175

Log:
When locking type is 'messages' we have to initialize messaging before locking. 
Reported by Chris Cowan
Modified:
   branches/tmp/vl-messaging/source/utils/status.c


Changeset:
Modified: branches/tmp/vl-messaging/source/utils/status.c
===================================================================
--- branches/tmp/vl-messaging/source/utils/status.c     2006-07-21 07:23:07 UTC 
(rev 17174)
+++ branches/tmp/vl-messaging/source/utils/status.c     2006-07-21 08:27:37 UTC 
(rev 17175)
@@ -318,6 +318,8 @@
                        break;
        }
 
+       message_init();
+
        if ( show_processes ) {
                tdb = tdb_open_log(lock_path("sessionid.tdb"), 0, TDB_DEFAULT, 
O_RDONLY, 0);
                if (!tdb) {
@@ -331,8 +333,10 @@
                        tdb_close(tdb);
                }
 
-               if (processes_only) 
-                       exit(0);        
+               if (processes_only)  {
+                       message_end();
+                       exit(0);
+               }       
        }
   
        if ( show_shares ) {
@@ -357,8 +361,10 @@
                        d_printf("\n");
                }
 
-               if ( shares_only )
+               if ( shares_only ) {
+                       message_end();          
                        exit(0);
+               }
        }
 
        if ( show_locks ) {
@@ -386,5 +392,7 @@
                locking_end();
        }
 
+       message_end();
+
        return (0);
 }

Reply via email to