mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
lib: Add ctdbd_prep_hdr_next_reqid()
Preparation for generic ctdb_req_send/recv: No need to expose ctdbd_next_reqid(), do basic preparations of a ctdb_req_header Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
c70b8f069b
commit
177de8ec3f
@ -104,6 +104,10 @@ int register_with_ctdbd(struct ctdbd_connection *conn, uint64_t srvid,
|
||||
void *private_data);
|
||||
int ctdbd_probe(const char *sockname, int timeout);
|
||||
|
||||
struct ctdb_req_header;
|
||||
void ctdbd_prep_hdr_next_reqid(
|
||||
struct ctdbd_connection *conn, struct ctdb_req_header *hdr);
|
||||
|
||||
struct tevent_req *ctdbd_parse_send(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
struct ctdbd_connection *conn,
|
||||
|
@ -1839,6 +1839,17 @@ static int ctdbd_connection_destructor(struct ctdbd_connection *c)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ctdbd_prep_hdr_next_reqid(
|
||||
struct ctdbd_connection *conn, struct ctdb_req_header *hdr)
|
||||
{
|
||||
*hdr = (struct ctdb_req_header) {
|
||||
.ctdb_magic = CTDB_MAGIC,
|
||||
.ctdb_version = CTDB_PROTOCOL,
|
||||
.reqid = ctdbd_next_reqid(conn),
|
||||
.destnode = CTDB_CURRENT_NODE,
|
||||
};
|
||||
}
|
||||
|
||||
struct ctdbd_parse_state {
|
||||
struct tevent_context *ev;
|
||||
struct ctdbd_connection *conn;
|
||||
|
Loading…
Reference in New Issue
Block a user