diff options
author | Volker Lendecke <vl@samba.org> | 2014-07-20 16:07:44 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-07-29 00:30:55 +0200 |
commit | d697c9fdcb9d1d08fa80fc78a299690c8114917c (patch) | |
tree | 4d9d8737c83ee34b31f228d057fc92769a48bbc0 /source4/lib | |
parent | d7b4f863e488cd8e088ec77c35718cfdcc19c743 (diff) | |
download | samba-d697c9fdcb9d1d08fa80fc78a299690c8114917c.tar.gz |
messaging4: Simplify imessaging_path
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 Jul 29 00:30:55 CEST 2014 on sn-devel-104
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/messaging/messaging.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index ffa668a4458..a67a58a6e06 100644 --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -136,15 +136,10 @@ static NTSTATUS irpc_uptime(struct irpc_message *msg, */ static char *imessaging_path(struct imessaging_context *msg, struct server_id server_id) { - TALLOC_CTX *tmp_ctx = talloc_new(msg); - const char *id = server_id_str(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; + struct server_id_buf buf; + + return talloc_asprintf(msg, "%s/msg.%s", msg->base_path, + server_id_str_buf(server_id, &buf)); } /* |