git.samba.org
/
ctdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b3ceec6
)
tests: fix segfault in fetch_one test when connection to ctdbd fails
author
Michael Adam
<obnox@samba.org>
Tue, 21 Dec 2010 16:15:41 +0000
(17:15 +0100)
committer
Michael Adam
<obnox@samba.org>
Wed, 9 Mar 2011 22:21:23 +0000
(23:21 +0100)
tests/src/ctdb_fetch_one.c
patch
|
blob
|
history
diff --git
a/tests/src/ctdb_fetch_one.c
b/tests/src/ctdb_fetch_one.c
index 15be3cabdc75388485056b70209e697eddda2901..7348aa698696408f293caa8d6fa89a448d4992bc 100644
(file)
--- a/
tests/src/ctdb_fetch_one.c
+++ b/
tests/src/ctdb_fetch_one.c
@@
-116,6
+116,11
@@
int main(int argc, const char *argv[])
ctdb = ctdb_cmdline_client(ev);
+ if (ctdb == NULL) {
+ printf("failed to connect to ctdb deamon.\n");
+ exit(1);
+ }
+
/* attach to a specific database */
ctdb_db = ctdb_attach(ctdb, "test.tdb", false, 0);
if (!ctdb_db) {