summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/status.c38
1 files changed, 20 insertions, 18 deletions
diff --git a/source3/utils/status.c b/source3/utils/status.c
index 47379fd57c..23e2f4a63c 100644
--- a/source3/utils/status.c
+++ b/source3/utils/status.c
@@ -621,32 +621,34 @@ static int traverse_sessionid(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, vo
tdb = tdb_open_log(lock_path("sessionid.tdb"), 0, TDB_DEFAULT, O_RDONLY, 0);
if (!tdb) {
d_printf("sessionid.tdb not initialised\n");
- }
-
- if (locks_only) goto locks;
+ } else {
+ if (locks_only) goto locks;
- d_printf("\nSamba version %s\n",VERSION);
- d_printf("PID Username Group Machine \n");
- d_printf("-------------------------------------------------------------------\n");
+ d_printf("\nSamba version %s\n",VERSION);
+ d_printf("PID Username Group Machine \n");
+ d_printf("-------------------------------------------------------------------\n");
- tdb_traverse(tdb, traverse_sessionid, NULL);
- tdb_close(tdb);
+ tdb_traverse(tdb, traverse_sessionid, NULL);
+ tdb_close(tdb);
+ }
tdb = tdb_open_log(lock_path("connections.tdb"), 0, TDB_DEFAULT, O_RDONLY, 0);
if (!tdb) {
d_printf("connections.tdb not initialised\n");
- } else if (verbose) {
- d_printf("Opened status file %s\n", fname);
- }
+ } else
+ if (verbose) {
+ d_printf("Opened status file %s\n", fname);
+ }
- if (brief)
- exit(0);
-
- d_printf("\nService pid machine Connected at\n");
- d_printf("-------------------------------------------------------\n");
+ if (brief)
+ exit(0);
+
+ d_printf("\nService pid machine Connected at\n");
+ d_printf("-------------------------------------------------------\n");
- tdb_traverse(tdb, traverse_fn1, NULL);
- tdb_close(tdb);
+ tdb_traverse(tdb, traverse_fn1, NULL);
+ tdb_close(tdb);
+ }
locks:
if (processes_only) exit(0);