summaryrefslogtreecommitdiffstats
path: root/ctdb/libctdb/sync.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronniesahlberg@gmail.com>2010-09-15 14:56:57 +1000
committerRonnie Sahlberg <ronniesahlberg@gmail.com>2010-09-15 14:58:11 +1000
commit22ea35f17ddb7c21bc2e3df5a1f7f7c4a0743ca2 (patch)
treea96c7593d8c0a65d665a96c3b7021962a01bc560 /ctdb/libctdb/sync.c
parent0b5bd411ca3c4ce9ff8f8e4224bc9b63319f0ffc (diff)
downloadsamba-22ea35f17ddb7c21bc2e3df5a1f7f7c4a0743ca2.tar.gz
samba-22ea35f17ddb7c21bc2e3df5a1f7f7c4a0743ca2.tar.xz
samba-22ea35f17ddb7c21bc2e3df5a1f7f7c4a0743ca2.zip
adda GETPUBLICIPS control to libctdb and use this in the test example
enhance the test example to show the new releaseip/takeip messages (This used to be ctdb commit 21cc57883e6c02b0e037211b26d1d866d5d7f03d)
Diffstat (limited to 'ctdb/libctdb/sync.c')
-rw-r--r--ctdb/libctdb/sync.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/ctdb/libctdb/sync.c b/ctdb/libctdb/sync.c
index d0aa86ac18..a1be3be9fa 100644
--- a/ctdb/libctdb/sync.c
+++ b/ctdb/libctdb/sync.c
@@ -138,6 +138,25 @@ bool ctdb_getnodemap(struct ctdb_connection *ctdb,
return ret;
}
+bool ctdb_getpublicips(struct ctdb_connection *ctdb,
+ uint32_t destnode, struct ctdb_all_public_ips **ips)
+{
+ struct ctdb_request *req;
+ bool done = false;
+ bool ret = false;
+
+ *ips = NULL;
+
+ req = synchronous(ctdb,
+ ctdb_getpublicips_send(ctdb, destnode, set, &done),
+ &done);
+ if (req != NULL) {
+ ret = ctdb_getpublicips_recv(ctdb, req, ips);
+ ctdb_request_free(ctdb, req);
+ }
+ return ret;
+}
+
bool ctdb_set_message_handler(struct ctdb_connection *ctdb, uint64_t srvid,
ctdb_message_fn_t handler, void *cbdata)
{