ctdb_control_send() does not need to take an outdata parameter
authorRonnie Sahlberg <sahlberg@ronnie>
Tue, 15 Jan 2008 23:23:26 +0000 (10:23 +1100)
committerRonnie Sahlberg <sahlberg@ronnie>
Tue, 15 Jan 2008 23:23:26 +0000 (10:23 +1100)
remove the outdata parameter from the function and all callers

client/ctdb_client.c
include/ctdb_private.h
server/ctdb_recoverd.c
tools/ctdb_vacuum.c

index 7cbfa6e4f092a249aee246f960c973ad78460e6e..75a6cecc8f4ec400431e3169189473b5ad9e8c99 100644 (file)
@@ -802,7 +802,7 @@ static void control_timeout_func(struct event_context *ev, struct timed_event *t
 struct ctdb_client_control_state *ctdb_control_send(struct ctdb_context *ctdb, 
                uint32_t destnode, uint64_t srvid, 
                uint32_t opcode, uint32_t flags, TDB_DATA data, 
-               TALLOC_CTX *mem_ctx, TDB_DATA *outdata,
+               TALLOC_CTX *mem_ctx,
                struct timeval *timeout,
                char **errormsg)
 {
@@ -944,7 +944,7 @@ int ctdb_control(struct ctdb_context *ctdb, uint32_t destnode, uint64_t srvid,
        struct ctdb_client_control_state *state;
 
        state = ctdb_control_send(ctdb, destnode, srvid, opcode, 
-                       flags, data, mem_ctx, outdata,
+                       flags, data, mem_ctx,
                        timeout, errormsg);
        return ctdb_control_recv(ctdb, state, mem_ctx, outdata, status, 
                        errormsg);
@@ -1014,7 +1014,7 @@ int ctdb_ctrl_shutdown(struct ctdb_context *ctdb, struct timeval timeout, uint32
 
        state = ctdb_control_send(ctdb, destnode, 0, 
                           CTDB_CONTROL_SHUTDOWN, 0, tdb_null, 
-                          NULL, NULL, &timeout, NULL);
+                          NULL, &timeout, NULL);
        if (state == NULL) {
                DEBUG(0,(__location__ " ctdb_control for shutdown failed\n"));
                return -1;
@@ -1070,7 +1070,7 @@ ctdb_ctrl_getrecmode_send(struct ctdb_context *ctdb, TALLOC_CTX *mem_ctx, struct
 {
        return ctdb_control_send(ctdb, destnode, 0, 
                           CTDB_CONTROL_GET_RECMODE, 0, tdb_null, 
-                          mem_ctx, NULL, &timeout, NULL);
+                          mem_ctx, &timeout, NULL);
 }
 
 int ctdb_ctrl_getrecmode_recv(struct ctdb_context *ctdb, TALLOC_CTX *mem_ctx, struct ctdb_client_control_state *state, uint32_t *recmode)
@@ -1136,7 +1136,7 @@ ctdb_ctrl_getrecmaster_send(struct ctdb_context *ctdb, TALLOC_CTX *mem_ctx,
 {
        return ctdb_control_send(ctdb, destnode, 0, 
                           CTDB_CONTROL_GET_RECMASTER, 0, tdb_null, 
-                          mem_ctx, NULL, &timeout, NULL);
+                          mem_ctx, &timeout, NULL);
 }
 
 int ctdb_ctrl_getrecmaster_recv(struct ctdb_context *ctdb, TALLOC_CTX *mem_ctx, struct ctdb_client_control_state *state, uint32_t *recmaster)
@@ -1300,7 +1300,7 @@ struct ctdb_client_control_state *ctdb_ctrl_pulldb_send(
 
        state = ctdb_control_send(ctdb, destnode, 0, 
                                  CTDB_CONTROL_PULL_DB, 0, indata, 
-                                 mem_ctx, NULL, &timeout, NULL);
+                                 mem_ctx, &timeout, NULL);
        talloc_free(pull);
 
        return state;
@@ -1842,7 +1842,7 @@ ctdb_ctrl_freeze_send(struct ctdb_context *ctdb, TALLOC_CTX *mem_ctx, struct tim
 {
        return ctdb_control_send(ctdb, destnode, 0, 
                           CTDB_CONTROL_FREEZE, 0, tdb_null, 
-                          mem_ctx, NULL, &timeout, NULL);
+                          mem_ctx, &timeout, NULL);
 }
 
 /* 
index 8780275769bab5f5a158a3558aeee7cdabd7cbee..99d9d99b180e25738f22b70d4fdedab5c92bf4f5 100644 (file)
@@ -896,7 +896,7 @@ struct ctdb_client_control_state *
 ctdb_control_send(struct ctdb_context *ctdb, 
                uint32_t destnode, uint64_t srvid, 
                uint32_t opcode, uint32_t flags, TDB_DATA data, 
-               TALLOC_CTX *mem_ctx, TDB_DATA *outdata,
+               TALLOC_CTX *mem_ctx,
                struct timeval *timeout,
                char **errormsg);
 
index a7664d6392b2cb2c4d10ecf4749050e8f8e72be7..a48cb2ffe7d0bd87b5fbd389a6ea479db18fd9a9 100644 (file)
@@ -278,7 +278,7 @@ static int async_control_on_active_nodes(struct ctdb_context *ctdb, enum ctdb_co
                        continue;
                }
                state = ctdb_control_send(ctdb, nodemap->nodes[j].pnn, 0, opcode, 
-                                         0, data, async_data, NULL, &timeout, NULL);
+                                         0, data, async_data, &timeout, NULL);
                if (state == NULL) {
                        DEBUG(0,(__location__ " Failed to call async control %u\n", (unsigned)opcode));
                        talloc_free(async_data);
index c3a69f7fa8fd6a1c11f930e97cebfcc08a351d9b..2bc9908c7ee1603e880a03a8fb46fadd57dd97a4 100644 (file)
@@ -105,7 +105,7 @@ static int async_control_on_vnnmap(struct ctdb_context *ctdb, enum ctdb_controls
                        continue;
                }
                state = ctdb_control_send(ctdb, pnn, 0, opcode, 
-                                         0, data, async_data, NULL, &timeout, NULL);
+                                         0, data, async_data, &timeout, NULL);
                if (state == NULL) {
                        DEBUG(0,(__location__ " Failed to call async control %u\n", (unsigned)opcode));
                        talloc_free(async_data);