summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-10-26 11:36:21 +0200
committerVolker Lendecke <vlendec@samba.org>2011-10-27 20:28:31 +0200
commitc5cfc83a3e045d87e1fe73160523282eec2314ec (patch)
treeccc621f486277661e3dbc3e2b91a2cb441a2b539
parent1c4fe3903333e9fa24c375c95cfc52a608f9b27b (diff)
downloadsamba-c5cfc83a3e045d87e1fe73160523282eec2314ec.tar.gz
samba-c5cfc83a3e045d87e1fe73160523282eec2314ec.tar.bz2
samba-c5cfc83a3e045d87e1fe73160523282eec2314ec.zip
s3-ctdb: Make ctdbd_process_exists use ctdbd_processes_exist
Not strictly necessary, but more code exercise is good
-rw-r--r--source3/lib/ctdbd_conn.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c
index f172bdfed4..7733f1ecd8 100644
--- a/source3/lib/ctdbd_conn.c
+++ b/source3/lib/ctdbd_conn.c
@@ -914,22 +914,17 @@ static NTSTATUS ctdbd_control(struct ctdbd_connection *conn,
*/
bool ctdbd_process_exists(struct ctdbd_connection *conn, uint32 vnn, pid_t pid)
{
- NTSTATUS status;
- TDB_DATA data;
- int32_t cstatus;
+ struct server_id id;
+ bool result;
- data.dptr = (uint8_t*)&pid;
- data.dsize = sizeof(pid);
+ id.pid = pid;
+ id.vnn = vnn;
- status = ctdbd_control(conn, vnn, CTDB_CONTROL_PROCESS_EXISTS, 0, 0,
- data, NULL, NULL, &cstatus);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, (__location__ " ctdb_control for process_exists "
- "failed\n"));
- return False;
+ if (!ctdb_processes_exist(conn, &id, 1, &result)) {
+ DEBUG(10, ("ctdb_processes_exist failed\n"));
+ return false;
}
-
- return cstatus == 0;
+ return result;
}
bool ctdb_processes_exist(struct ctdbd_connection *conn,