]> code.citadel.org Git - citadel.git/blobdiff - citadel/sendcommand.c
* Changed the comments at the beginning of each file to a consistent format
[citadel.git] / citadel / sendcommand.c
index 2de7706d5d509fe09587f976c702bac1ad297736..be69778541eb640f0e0c562e7da799b7bcb8c01e 100644 (file)
@@ -1,5 +1,8 @@
 /*
  * $Id$
+ *
+ * Command-line utility to transmit a server command.
+ *
  */
 
 
@@ -20,7 +23,7 @@
 #include "ipc.h"
 #include "config.h"
 
-#define LOCKFILE "/var/lock/LCK.sendcommand"
+#define LOCKFILE "/tmp/LCK.sendcommand"
 
 struct config config;
 extern int home_specified;
@@ -88,13 +91,10 @@ void logoff(int e)
 void np_attach_to_server(void) {
        char hostbuf[256], portbuf[256];
        char buf[256];
-       char portname[8];
-       char *args[] = { "sendcommand", NULL, NULL, NULL } ;
+       char *args[] = { "sendcommand", NULL } ;
 
        fprintf(stderr, "Attaching to server...\n");
-       sprintf(portname, "%d", config.c_port_number);
-       args[2] = portname;
-       attach_to_server(3, args, hostbuf, portbuf);
+       attach_to_server(1, args, hostbuf, portbuf);
        serv_gets(buf);
        fprintf(stderr, "%s\n",&buf[4]);
        sprintf(buf,"IPGM %d", config.c_ipgm_secret);