- changed the msg_type to be an int instead of an enum so that it is
[samba.git] / source3 / utils / msgtest.c
1 /* 
2    Unix SMB/Netbios implementation.
3    Version 1.9.
4    status reporting
5    Copyright (C) Andrew Tridgell 1994-1998
6    
7    This program is free software; you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation; either version 2 of the License, or
10    (at your option) any later version.
11    
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16    
17    You should have received a copy of the GNU General Public License
18    along with this program; if not, write to the Free Software
19    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20
21    Revision History:
22
23    12 aug 96: Erik.Devriendt@te6.siemens.be
24    added support for shared memory implementation of share mode locking
25
26    21-Jul-1998: rsharpe@ns.aus.com (Richard Sharpe)
27    Added -L (locks only) -S (shares only) flags and code
28
29 */
30
31 /*
32  * This program reports current SMB connections
33  */
34
35 #define NO_SYSLOG
36
37 #include "includes.h"
38
39
40
41  int main(int argc, char *argv[])
42 {
43         pid_t pid;
44         int level;
45         static pstring servicesf = CONFIGFILE;
46
47         TimeInit();
48         setup_logging(argv[0],True);
49         
50         charset_initialise();
51
52         lp_load(servicesf,False,False,False);
53
54         message_init();
55
56         pid = atoi(argv[1]);
57         level = atoi(argv[2]);
58
59         message_send_pid(pid, MSG_FORCE_ELECTION, NULL, 0);
60
61         return (0);
62 }
63