summaryrefslogtreecommitdiff
path: root/ctdb/protocol/protocol_api.h
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2016-05-01 22:13:35 +1000
committerMartin Schwenke <martins@samba.org>2016-05-03 04:43:20 +0200
commit10dbeddab5237b401c1eb42a50a27dde19a580c9 (patch)
treee8d5f1afba71c1f51ce50dcdf5d1e3f2f268ccdd /ctdb/protocol/protocol_api.h
parentf288ce84281c62cd8e0026caf3dd9c89acc2a2ef (diff)
downloadsamba-10dbeddab5237b401c1eb42a50a27dde19a580c9.tar.gz
ctdb-protocol: Return required buffer size in push functions
If the buffer size provided is not sufficient, then return the required buffer length. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb/protocol/protocol_api.h')
-rw-r--r--ctdb/protocol/protocol_api.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/ctdb/protocol/protocol_api.h b/ctdb/protocol/protocol_api.h
index 78cc6212787..0f781ccce7a 100644
--- a/ctdb/protocol/protocol_api.h
+++ b/ctdb/protocol/protocol_api.h
@@ -90,7 +90,7 @@ size_t ctdb_req_call_len(struct ctdb_req_header *h,
int ctdb_req_call_push(struct ctdb_req_header *h,
struct ctdb_req_call *c,
- uint8_t *buf, size_t buflen);
+ uint8_t *buf, size_t *buflen);
int ctdb_req_call_pull(uint8_t *buf, size_t buflen,
struct ctdb_req_header *h,
@@ -102,7 +102,7 @@ size_t ctdb_reply_call_len(struct ctdb_req_header *h,
int ctdb_reply_call_push(struct ctdb_req_header *h,
struct ctdb_reply_call *c,
- uint8_t *buf, size_t buflen);
+ uint8_t *buf, size_t *buflen);
int ctdb_reply_call_pull(uint8_t *buf, size_t buflen,
struct ctdb_req_header *h,
@@ -114,7 +114,7 @@ size_t ctdb_reply_error_len(struct ctdb_req_header *h,
int ctdb_reply_error_push(struct ctdb_req_header *h,
struct ctdb_reply_error *c,
- uint8_t *buf, size_t buflen);
+ uint8_t *buf, size_t *buflen);
int ctdb_reply_error_pull(uint8_t *buf, size_t buflen,
struct ctdb_req_header *h,
@@ -126,7 +126,7 @@ size_t ctdb_req_dmaster_len(struct ctdb_req_header *h,
int ctdb_req_dmaster_push(struct ctdb_req_header *h,
struct ctdb_req_dmaster *c,
- uint8_t *buf, size_t buflen);
+ uint8_t *buf, size_t *buflen);
int ctdb_req_dmaster_pull(uint8_t *buf, size_t buflen,
struct ctdb_req_header *h,
@@ -138,7 +138,7 @@ size_t ctdb_reply_dmaster_len(struct ctdb_req_header *h,
int ctdb_reply_dmaster_push(struct ctdb_req_header *h,
struct ctdb_reply_dmaster *c,
- uint8_t *buf, size_t buflen);
+ uint8_t *buf, size_t *buflen);
int ctdb_reply_dmaster_pull(uint8_t *buf, size_t buflen,
struct ctdb_req_header *h,
@@ -152,7 +152,7 @@ size_t ctdb_req_control_len(struct ctdb_req_header *h,
int ctdb_req_control_push(struct ctdb_req_header *h,
struct ctdb_req_control *c,
- uint8_t *buf, size_t buflen);
+ uint8_t *buf, size_t *buflen);
int ctdb_req_control_pull(uint8_t *buf, size_t buflen,
struct ctdb_req_header *h,
@@ -164,7 +164,7 @@ size_t ctdb_reply_control_len(struct ctdb_req_header *h,
int ctdb_reply_control_push(struct ctdb_req_header *h,
struct ctdb_reply_control *c,
- uint8_t *buf, size_t buflen);
+ uint8_t *buf, size_t *buflen);
int ctdb_reply_control_pull(uint8_t *buf, size_t buflen, uint32_t opcode,
struct ctdb_req_header *h,
@@ -654,7 +654,7 @@ size_t ctdb_req_message_len(struct ctdb_req_header *h,
int ctdb_req_message_push(struct ctdb_req_header *h,
struct ctdb_req_message *c,
- uint8_t *buf, size_t buflen);
+ uint8_t *buf, size_t *buflen);
int ctdb_req_message_pull(uint8_t *buf, size_t buflen,
struct ctdb_req_header *h,
@@ -666,7 +666,7 @@ size_t ctdb_req_message_data_len(struct ctdb_req_header *h,
int ctdb_req_message_data_push(struct ctdb_req_header *h,
struct ctdb_req_message_data *c,
- uint8_t *buf, size_t buflen);
+ uint8_t *buf, size_t *buflen);
int ctdb_req_message_data_pull(uint8_t *buf, size_t buflen,
struct ctdb_req_header *h,