Merge commit 'rusty/libctdb2'
[sahlberg/ctdb.git] / tests / src / ctdb_bench.c
index b1fb5502a1d9fcd7915e865cfa20b660c38c3008..2c5a6545a6bcc747011991d25fe3ad30e024cd24 100644 (file)
@@ -103,7 +103,7 @@ static void ring_message_handler(struct ctdb_context *ctdb, uint64_t srvid,
 }
 
 
-void send_start_messages(struct ctdb_context *ctdb, int incr)
+static void send_start_messages(struct ctdb_context *ctdb, int incr)
 {
        /* two messages are injected into the ring, moving
           in opposite directions */
@@ -214,6 +214,11 @@ int main(int argc, const char *argv[])
                while (extra_argv[extra_argc]) extra_argc++;
        }
 
+       if (num_nodes == 0) {
+               printf("You must specify the number of nodes\n");
+               exit(1);
+       }
+
        ev = event_context_init(NULL);
 
        /* initialise ctdb */