mirror of
https://github.com/samba-team/samba.git
synced 2025-01-27 14:04:05 +03:00
unix_msg: modify find_send_queue() to take a struct sockaddr_un
In one of the next commits unix_dgram_send_queue_init() will be moved into find_send_queue and that takes a struct sockaddr_un. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
cfce21281a
commit
3f45fcebdc
@ -434,12 +434,12 @@ static void unix_dgram_send_queue_free(struct unix_dgram_send_queue *q)
|
||||
}
|
||||
|
||||
static struct unix_dgram_send_queue *find_send_queue(
|
||||
struct unix_dgram_ctx *ctx, const char *dst_sock)
|
||||
struct unix_dgram_ctx *ctx, const struct sockaddr_un *dst)
|
||||
{
|
||||
struct unix_dgram_send_queue *s;
|
||||
|
||||
for (s = ctx->send_queues; s != NULL; s = s->next) {
|
||||
if (strcmp(s->path, dst_sock) == 0) {
|
||||
if (strcmp(s->path, dst->sun_path) == 0) {
|
||||
return s;
|
||||
}
|
||||
}
|
||||
@ -604,7 +604,7 @@ static int unix_dgram_send(struct unix_dgram_ctx *ctx,
|
||||
* To preserve message ordering, we have to queue a message when
|
||||
* others are waiting in line already.
|
||||
*/
|
||||
q = find_send_queue(ctx, dst->sun_path);
|
||||
q = find_send_queue(ctx, dst);
|
||||
if (q != NULL) {
|
||||
return queue_msg(q, iov, iovlen, fds, num_fds);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user