s4-messaging: remove only usage of debug_ctx()
authorAndrew Tridgell <tridge@samba.org>
Fri, 8 Jan 2010 22:05:29 +0000 (09:05 +1100)
committerAndrew Tridgell <tridge@samba.org>
Fri, 8 Jan 2010 23:15:13 +0000 (10:15 +1100)
source4/lib/messaging/messaging.c

index d4dfff7c8ccc23e8118b6b0570b56c0a608ec8cd..c12945b622edd9abaefa30c0266a2315bd866344 100644 (file)
@@ -268,11 +268,13 @@ static void messaging_send_handler(struct messaging_context *msg)
                }
                rec->retries = 0;
                if (!NT_STATUS_IS_OK(status)) {
                }
                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", 
                        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)));
                                 rec->header->msg_type, 
                                 nt_errstr(status)));
+                       talloc_free(tmp_ctx);
                }
                DLIST_REMOVE(msg->pending, rec);
                talloc_free(rec);
                }
                DLIST_REMOVE(msg->pending, rec);
                talloc_free(rec);