From 7b9d6ac23e1a7d8136fffd2e3977b09a815da65a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 3 May 2005 07:33:49 +0000 Subject: r6595: This is Volkers new-talloc patch. Just got the go-ahead from Volker to commit. Woo Hoo ! Jeremy. (This used to be commit 316df944a456f150944761dab34add5e8c4ab699) --- source3/lib/tallocmsg.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'source3/lib/tallocmsg.c') diff --git a/source3/lib/tallocmsg.c b/source3/lib/tallocmsg.c index bbe1ee60a4..8ee3c257f6 100644 --- a/source3/lib/tallocmsg.c +++ b/source3/lib/tallocmsg.c @@ -33,19 +33,18 @@ void msg_pool_usage(int msg_type, pid_t src_pid, void *UNUSED(buf), size_t UNUSED(len)) { - char *reply; - TALLOC_CTX *reply_pool = talloc_init("msg_pool_usage"); + off_t reply; + fstring reply_str; SMB_ASSERT(msg_type == MSG_REQ_POOL_USAGE); DEBUG(2,("Got POOL_USAGE\n")); - reply = talloc_describe_all(reply_pool); + reply = talloc_total_size(NULL); + fstr_sprintf(reply_str, "%lld", reply); message_send_pid(src_pid, MSG_POOL_USAGE, - reply, strlen(reply)+1, True); - - talloc_destroy(reply_pool); + reply_str, strlen(reply_str)+1, True); } /** -- cgit