1
0
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:
Michael Adam 2014-09-30 11:29:22 +02:00
parent d8af3e76a3
commit 00d9ee04dd
3 changed files with 4 additions and 4 deletions

View File

@ -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(

View File

@ -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)

View File

@ -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);