summaryrefslogtreecommitdiff
path: root/ctdb/protocol
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2017-07-11 02:16:24 +1000
committerMartin Schwenke <martins@samba.org>2017-09-01 08:52:07 +0200
commitdfa87862fb3f2c17094bb8ac921b369c344c556d (patch)
treefd2ea72dda9f194f3c82357750bc0b4967b1b8fd /ctdb/protocol
parent164d65ace283188d00224dd1e001b8776d393fd8 (diff)
downloadsamba-dfa87862fb3f2c17094bb8ac921b369c344c556d.tar.gz
ctdb-protocol: Drop struct ctdb_event_header
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb/protocol')
-rw-r--r--ctdb/protocol/protocol.h5
-rw-r--r--ctdb/protocol/protocol_api.h2
-rw-r--r--ctdb/protocol/protocol_event.c53
3 files changed, 0 insertions, 60 deletions
diff --git a/ctdb/protocol/protocol.h b/ctdb/protocol/protocol.h
index 15d2faa80f1..c61b97249a6 100644
--- a/ctdb/protocol/protocol.h
+++ b/ctdb/protocol/protocol.h
@@ -1081,11 +1081,6 @@ struct ctdb_event_reply_data {
} data;
};
-struct ctdb_event_header {
- uint32_t length;
- uint32_t reqid;
-};
-
struct ctdb_event_request {
struct sock_packet_header header;
struct ctdb_event_request_data rdata;
diff --git a/ctdb/protocol/protocol_api.h b/ctdb/protocol/protocol_api.h
index 22fc4483205..83ebd4862ff 100644
--- a/ctdb/protocol/protocol_api.h
+++ b/ctdb/protocol/protocol_api.h
@@ -652,8 +652,6 @@ int ctdb_req_keepalive_pull(uint8_t *buf, size_t buflen,
/* From protocol/protocol_event.c */
-void ctdb_event_header_fill(struct ctdb_event_header *h, uint32_t reqid);
-
size_t ctdb_event_request_len(struct ctdb_event_request *in);
int ctdb_event_request_push(struct ctdb_event_request *in,
diff --git a/ctdb/protocol/protocol_event.c b/ctdb/protocol/protocol_event.c
index 40e21ce2dfb..af6040abd92 100644
--- a/ctdb/protocol/protocol_event.c
+++ b/ctdb/protocol/protocol_event.c
@@ -801,59 +801,6 @@ static int ctdb_event_reply_data_pull(uint8_t *buf, size_t buflen,
return 0;
}
-size_t ctdb_event_header_len(struct ctdb_event_header *in);
-void ctdb_event_header_push(struct ctdb_event_header *in, uint8_t *buf,
- size_t *npush);
-int ctdb_event_header_pull(uint8_t *buf, size_t buflen, TALLOC_CTX *mem_ctx,
- struct ctdb_event_header *out, size_t *npull);
-
-size_t ctdb_event_header_len(struct ctdb_event_header *in)
-{
- return ctdb_uint32_len(&in->length) + ctdb_uint32_len(&in->reqid);
-}
-
-void ctdb_event_header_push(struct ctdb_event_header *in, uint8_t *buf,
- size_t *npush)
-{
- size_t offset = 0, np;
-
- ctdb_uint32_push(&in->length, buf, &np);
- offset += np;
-
- ctdb_uint32_push(&in->reqid, buf+offset, &np);
- offset += np;
-
- *npush = offset;
-}
-
-int ctdb_event_header_pull(uint8_t *buf, size_t buflen, TALLOC_CTX *mem_ctx,
- struct ctdb_event_header *out, size_t *npull)
-{
- size_t offset = 0, np;
- int ret;
-
- ret = ctdb_uint32_pull(buf, buflen, &out->length, &np);
- if (ret != 0) {
- return ret;
- }
- offset += np;
-
- ret = ctdb_uint32_pull(buf+offset, buflen-offset, &out->reqid, &np);
- if (ret != 0) {
- return ret;
- }
- offset += np;
-
- *npull = offset;
- return 0;
-}
-
-void ctdb_event_header_fill(struct ctdb_event_header *h, uint32_t reqid)
-{
- h->length = ctdb_event_header_len(h);
- h->reqid = reqid;
-}
-
size_t ctdb_event_request_len(struct ctdb_event_request *in)
{
return sock_packet_header_len(&in->header) +