Some "ctdb ..." commands can be run without having the main daemon running.
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 8 Jun 2010 23:17:35 +0000 (09:17 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 8 Jun 2010 23:17:35 +0000 (09:17 +1000)
commit18168da84a6aa8d69465e43402444c7ec979604a
tree1ba181ef9c0bf43af13c8bed819aaf4ab3e98dd8
parentae5b89dca00ca080c70868430fa54ba07bd6f5f4
Some "ctdb ..." commands can be run without having the main daemon running.

In that case, when the main daemon is not running
the ctdb context will be initialized to NULL, since we can not connect.

Move the calls to read the ctdb socketname and connecting via libctdb to
only happen when we are executing a "ctdb ..." command that requires that we talk to the actual daemon.
Otherwise we will get an ugly SEGV for the "ctdb ..." commandline tool
when trying to run a command that is supposed to work also when the daemon is down.
tools/ctdb.c