mirror of
https://github.com/samba-team/samba.git
synced 2025-03-01 04:58:35 +03:00
messaging3: Use server_id_str_buf
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Jun 17 09:27:07 CEST 2014 on sn-devel-104
This commit is contained in:
parent
f0e1a8e1e2
commit
35dd4de886
@ -301,6 +301,7 @@ static NTSTATUS messaging_dgm_send(struct server_id src,
|
|||||||
struct messaging_dgm_hdr hdr;
|
struct messaging_dgm_hdr hdr;
|
||||||
struct iovec iov2[iovlen + 1];
|
struct iovec iov2[iovlen + 1];
|
||||||
ssize_t pathlen;
|
ssize_t pathlen;
|
||||||
|
struct server_id_buf idbuf;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
fstr_sprintf(pid_str, "msg/%u", (unsigned)pid.pid);
|
fstr_sprintf(pid_str, "msg/%u", (unsigned)pid.pid);
|
||||||
@ -318,7 +319,7 @@ static NTSTATUS messaging_dgm_send(struct server_id src,
|
|||||||
|
|
||||||
DEBUG(10, ("%s: Sending message 0x%x to %s\n", __func__,
|
DEBUG(10, ("%s: Sending message 0x%x to %s\n", __func__,
|
||||||
(unsigned)hdr.msg_type,
|
(unsigned)hdr.msg_type,
|
||||||
server_id_str(talloc_tos(), &pid)));
|
server_id_str_buf(pid, &idbuf)));
|
||||||
|
|
||||||
iov2[0].iov_base = &hdr;
|
iov2[0].iov_base = &hdr;
|
||||||
iov2[0].iov_len = sizeof(hdr);
|
iov2[0].iov_len = sizeof(hdr);
|
||||||
@ -344,6 +345,7 @@ static void messaging_dgm_recv(struct unix_msg_ctx *ctx,
|
|||||||
private_data, struct messaging_dgm_context);
|
private_data, struct messaging_dgm_context);
|
||||||
struct messaging_dgm_hdr *hdr;
|
struct messaging_dgm_hdr *hdr;
|
||||||
struct messaging_rec rec;
|
struct messaging_rec rec;
|
||||||
|
struct server_id_buf idbuf;
|
||||||
|
|
||||||
if (msg_len < sizeof(*hdr)) {
|
if (msg_len < sizeof(*hdr)) {
|
||||||
DEBUG(1, ("message too short: %u\n", (unsigned)msg_len));
|
DEBUG(1, ("message too short: %u\n", (unsigned)msg_len));
|
||||||
@ -364,7 +366,7 @@ static void messaging_dgm_recv(struct unix_msg_ctx *ctx,
|
|||||||
|
|
||||||
DEBUG(10, ("%s: Received message 0x%x len %u from %s\n", __func__,
|
DEBUG(10, ("%s: Received message 0x%x len %u from %s\n", __func__,
|
||||||
(unsigned)hdr->msg_type, (unsigned)rec.buf.length,
|
(unsigned)hdr->msg_type, (unsigned)rec.buf.length,
|
||||||
server_id_str(talloc_tos(), &rec.src)));
|
server_id_str_buf(rec.src, &idbuf)));
|
||||||
|
|
||||||
messaging_dispatch_rec(dgm_ctx->msg_ctx, &rec);
|
messaging_dispatch_rec(dgm_ctx->msg_ctx, &rec);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user