Add harmless parentheses so that dmalloc doesn't get confused by a
[ira/wip.git] / source3 / lib / tallocmsg.c
index e98e457880d2ff9ccc29bed898cfd4dffeb84d60..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
  * Respond to a POOL_USAGE message by sending back string form of memory
  * usage stats.
  **/
-void msg_pool_usage(int msg_type, pid_t pid, void *buf, size_t len)
+void msg_pool_usage(int msg_type, pid_t src_pid, void *buf, size_t len)
 {
+       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);
 }
 
 /**