mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
s3:messaging: allow the messaging receive callback to change the fds
This allows the callback to consume the fds and e.g. set them to -1 so that the caller can then treat (close) only those fds that have not been consumed. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
parent
d8af3e76a3
commit
00d9ee04dd
@ -204,7 +204,7 @@ bool message_send_all(struct messaging_context *msg_ctx,
|
||||
}
|
||||
|
||||
static void messaging_recv_cb(const uint8_t *msg, size_t msg_len,
|
||||
const int *fds, size_t num_fds,
|
||||
int *fds, size_t num_fds,
|
||||
void *private_data)
|
||||
{
|
||||
struct messaging_context *msg_ctx = talloc_get_type_abort(
|
||||
|
@ -44,7 +44,7 @@ struct messaging_dgm_context {
|
||||
|
||||
void (*recv_cb)(const uint8_t *msg,
|
||||
size_t msg_len,
|
||||
const int *fds,
|
||||
int *fds,
|
||||
size_t num_fds,
|
||||
void *private_data);
|
||||
void *recv_cb_private_data;
|
||||
@ -181,7 +181,7 @@ int messaging_dgm_init(struct tevent_context *ev,
|
||||
uid_t dir_owner,
|
||||
void (*recv_cb)(const uint8_t *msg,
|
||||
size_t msg_len,
|
||||
const int *fds,
|
||||
int *fds,
|
||||
size_t num_fds,
|
||||
void *private_data),
|
||||
void *recv_cb_private_data)
|
||||
|
@ -26,7 +26,7 @@ int messaging_dgm_init(struct tevent_context *ev,
|
||||
uid_t dir_owner,
|
||||
void (*recv_cb)(const uint8_t *msg,
|
||||
size_t msg_len,
|
||||
const int *fds,
|
||||
int *fds,
|
||||
size_t num_fds,
|
||||
void *private_data),
|
||||
void *recv_cb_private_data);
|
||||
|
Loading…
Reference in New Issue
Block a user