summaryrefslogtreecommitdiff
path: root/source4/lib/messaging
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/messaging')
-rw-r--r--source4/lib/messaging/messaging.c17
-rw-r--r--source4/lib/messaging/messaging.h1
2 files changed, 14 insertions, 4 deletions
diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c
index 277688e8b6..c12945b622 100644
--- a/source4/lib/messaging/messaging.c
+++ b/source4/lib/messaging/messaging.c
@@ -119,8 +119,15 @@ static NTSTATUS irpc_uptime(struct irpc_message *msg,
*/
static char *messaging_path(struct messaging_context *msg, struct server_id server_id)
{
- return talloc_asprintf(msg, "%s/msg.%s", msg->base_path,
- cluster_id_string(msg, server_id));
+ TALLOC_CTX *tmp_ctx = talloc_new(msg);
+ const char *id = cluster_id_string(tmp_ctx, server_id);
+ char *s;
+ if (id == NULL) {
+ return NULL;
+ }
+ s = talloc_asprintf(msg, "%s/msg.%s", msg->base_path, id);
+ talloc_steal(s, tmp_ctx);
+ return s;
}
/*
@@ -261,11 +268,13 @@ static void messaging_send_handler(struct messaging_context *msg)
}
rec->retries = 0;
if (!NT_STATUS_IS_OK(status)) {
+ TALLOC_CTX *tmp_ctx = talloc_new(msg);
DEBUG(1,("messaging: Lost message from %s to %s of type %u - %s\n",
- cluster_id_string(debug_ctx(), rec->header->from),
- cluster_id_string(debug_ctx(), rec->header->to),
+ cluster_id_string(tmp_ctx, rec->header->from),
+ cluster_id_string(tmp_ctx, rec->header->to),
rec->header->msg_type,
nt_errstr(status)));
+ talloc_free(tmp_ctx);
}
DLIST_REMOVE(msg->pending, rec);
talloc_free(rec);
diff --git a/source4/lib/messaging/messaging.h b/source4/lib/messaging/messaging.h
index 4ec69c8f34..08953856a0 100644
--- a/source4/lib/messaging/messaging.h
+++ b/source4/lib/messaging/messaging.h
@@ -32,6 +32,7 @@ struct messaging_context;
#define MSG_IRPC 6
#define MSG_PVFS_NOTIFY 7
#define MSG_NTVFS_OPLOCK_BREAK 8
+#define MSG_DREPL_ALLOCATE_RID 9
/* temporary messaging endpoints are allocated above this line */
#define MSG_TMP_BASE 1000