diff options
author | Michael Adam <obnox@samba.org> | 2010-12-21 17:18:03 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-03-09 11:22:21 +0100 |
commit | eb5a0cc1e22149337e49eb129f6ea90e21aa0889 (patch) | |
tree | 2d7692619e3108d77ee2f6b1b82199f0776567dc /ctdb/tests/src | |
parent | 1a08df9a460e27383a93a146f18cb93200ed1aba (diff) | |
download | samba-eb5a0cc1e22149337e49eb129f6ea90e21aa0889.tar.gz samba-eb5a0cc1e22149337e49eb129f6ea90e21aa0889.tar.xz samba-eb5a0cc1e22149337e49eb129f6ea90e21aa0889.zip |
tests: fix segfault in store test when connection to ctdbd failed.
(This used to be ctdb commit 43a15d2906b3f9d08af234f55a3a0f614571d3a7)
Diffstat (limited to 'ctdb/tests/src')
-rw-r--r-- | ctdb/tests/src/ctdb_store.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ctdb/tests/src/ctdb_store.c b/ctdb/tests/src/ctdb_store.c index e4c4052412..82669b7b6d 100644 --- a/ctdb/tests/src/ctdb_store.c +++ b/ctdb/tests/src/ctdb_store.c @@ -138,6 +138,11 @@ int main(int argc, const char *argv[]) ctdb = ctdb_cmdline_client(ev); + if (ctdb == NULL) { + printf("failed to connect to ctdb daemon.\n"); + exit(1); + } + /* attach to a specific database */ ctdb_db = ctdb_attach(ctdb, "test.tdb", false, 0); if (!ctdb_db) { |