smbd now sends a reply to MSG_REQ_POOL_USAGE, though it's pretty
authorMartin Pool <mbp@samba.org>
Thu, 3 Jan 2002 04:22:55 +0000 (04:22 +0000)
committerMartin Pool <mbp@samba.org>
Thu, 3 Jan 2002 04:22:55 +0000 (04:22 +0000)
boring so far.
(This used to be commit 9b217dce7fe89d1e36a91d7d011c2a9fe185e0d3)

source3/lib/tallocmsg.c
source3/utils/smbcontrol.c

index e98e457880d2ff9ccc29bed898cfd4dffeb84d60..a0987aba77d4c0b9f069fdd8701f7840fd5894c0 100644 (file)
  * 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 = "no memory usage info yet";
+       
        DEBUG(2,("Got POOL_USAGE\n"));
+       message_send_pid(src_pid, MSG_POOL_USAGE,
+                        reply, strlen(reply)+1, True);
 }
 
 /**
index 4f89ae37b5df20a7f37aeb158b3c29e4cdaf8f5c..9be34b132db19afd3c8f189bacddc9b3f463ab69 100644 (file)
@@ -149,7 +149,8 @@ void profilelevel_function(int msg_type, pid_t src, void *buf, size_t len)
  **/
 static void pool_usage_cb(int msg_type, pid_t src_pid, void *buf, size_t len)
 {
-       printf("Got POOL_USAGE reply from %u\n", (unsigned int) src_pid);
+       printf("Got POOL_USAGE reply from pid%u:\n%.*s\n",
+              (unsigned int) src_pid, (int) len, (const char *) buf);
 }