diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-05-02 10:05:46 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-05-03 07:37:06 +0200 |
commit | 85eb4377dbc9e2d25e0ee2e358e785347b09f0a7 (patch) | |
tree | 6f9f20fc991926620678fba7df5aeb12b9241901 /source4/lib/messaging/messaging.c | |
parent | 8da8c36b53cc115f0d446b666fc24fc9423d808e (diff) | |
download | samba-85eb4377dbc9e2d25e0ee2e358e785347b09f0a7.tar.gz samba-85eb4377dbc9e2d25e0ee2e358e785347b09f0a7.tar.bz2 samba-85eb4377dbc9e2d25e0ee2e358e785347b09f0a7.zip |
s4:cluster Rename .id to .pid in server_id
This also changes some DEBUG messages to use cluster_id_string()
rather than .id, to isolate them from this and other changes.
Andrew Bartlett
Diffstat (limited to 'source4/lib/messaging/messaging.c')
-rw-r--r-- | source4/lib/messaging/messaging.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index f9d63203f2..48c9c16fb9 100644 --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -109,9 +109,11 @@ static void irpc_handler(struct messaging_context *, void *, static void ping_message(struct messaging_context *msg, void *private_data, uint32_t msg_type, struct server_id src, DATA_BLOB *data) { - DEBUG(1,("INFO: Received PING message from server %u.%u [%.*s]\n", - (unsigned int)src.node, (unsigned int)src.id, (int)data->length, + char *task_id = cluster_id_string(NULL, src); + DEBUG(1,("INFO: Received PING message from server %s [%.*s]\n", + task_id, (int)data->length, data->data?(const char *)data->data:"")); + talloc_free(task_id); messaging_send(msg, src, MSG_PONG, data); } @@ -638,7 +640,7 @@ struct messaging_context *messaging_client_init(TALLOC_CTX *mem_ctx, { struct server_id id; ZERO_STRUCT(id); - id.id = random() % 0x10000000; + id.pid = random() % 0x10000000; return messaging_init(mem_ctx, dir, id, ev); } /* @@ -1312,7 +1314,7 @@ struct dcerpc_binding_handle *irpc_binding_handle_by_name(TALLOC_CTX *mem_ctx, errno = EADDRNOTAVAIL; return NULL; } - if (sids[0].id == 0) { + if (sids[0].pid == 0) { talloc_free(sids); errno = EADDRNOTAVAIL; return NULL; |