Send back talloc allocation information when POOL_USAGE is received.
authorMartin Pool <mbp@samba.org>
Thu, 3 Jan 2002 05:26:57 +0000 (05:26 +0000)
committerMartin Pool <mbp@samba.org>
Thu, 3 Jan 2002 05:26:57 +0000 (05:26 +0000)
(This used to be commit 7cb8e95f9332d4c278d2aac5416f963639609d5a)

source3/lib/tallocmsg.c

index a0987aba77d4c0b9f069fdd8701f7840fd5894c0..fabc06fb9396377cd742dc3ee1f659bd53dfa0cd 100644 (file)
@@ -1,6 +1,6 @@
 /* 
    samba -- Unix SMB/Netbios implementation.
-   Copyright (C) 2001 by Martin Pool
+   Copyright (C) 2001, 2002 by Martin Pool
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
  **/
 void msg_pool_usage(int msg_type, pid_t src_pid, void *buf, size_t len)
 {
-       char *reply = "no memory usage info yet";
+       char *reply;
+       TALLOC_CTX *reply_pool = talloc_init_named("msg_pool_usage");
        
        DEBUG(2,("Got POOL_USAGE\n"));
+
+       reply = talloc_describe_all(reply_pool);
+       
        message_send_pid(src_pid, MSG_POOL_USAGE,
                         reply, strlen(reply)+1, True);
+
+       talloc_destroy(reply_pool);
 }
 
 /**