added a shutdown command to smbcontrol.
authorJean-François Micouleau <jfm@samba.org>
Fri, 29 Mar 2002 13:49:48 +0000 (13:49 +0000)
committerJean-François Micouleau <jfm@samba.org>
Fri, 29 Mar 2002 13:49:48 +0000 (13:49 +0000)
have to add the server side now.

J.F.
(This used to be commit b83f87d6811dbad2c254cd5add4bbedb3196c629)

source3/include/messages.h
source3/utils/smbcontrol.c

index f5dbb1c4b85f946866a13754e6a5ad4d2ae35d75..9868b5de099a9776bbe1296accdc557c61559001 100644 (file)
@@ -41,6 +41,8 @@
  * what has changed since the last MARK */
 #define MSG_REQ_DMALLOC_LOG_CHANGED    12
 
+#define MSG_SHUTDOWN           13
+
 /* nmbd messages */
 #define MSG_FORCE_ELECTION 1001
 #define MSG_WINS_NEW_ENTRY 1002
index f492a94542895dba24025a489edf078bc3e1497e..d680fa4489a261aa555c734e65b07c3d4a8205b5 100644 (file)
@@ -40,6 +40,7 @@ static struct {
        {"pool-usage", MSG_REQ_POOL_USAGE },
        {"dmalloc-mark", MSG_REQ_DMALLOC_MARK },
        {"dmalloc-log-changed", MSG_REQ_DMALLOC_LOG_CHANGED },
+       {"shutdown", MSG_SHUTDOWN },
        {NULL, -1}
 };
 
@@ -430,6 +431,11 @@ static BOOL do_command(char *dest, char *msg_name, int iparams, char **params)
                if (!send_message(dest, mtype, NULL, 0, False))
                        return False;
                break;
+
+       case MSG_SHUTDOWN:
+               if (!send_message(dest, MSG_SHUTDOWN, NULL, 0, False))
+                       return False;
+               break;
        }
 
        return (True);