Fixed userlist command so it defaults to using unix domain socket
authorDave West <davew@uncensored.citadel.org>
Wed, 10 Oct 2007 19:19:14 +0000 (19:19 +0000)
committerDave West <davew@uncensored.citadel.org>
Wed, 10 Oct 2007 19:19:14 +0000 (19:19 +0000)
instead of SEGFLTing.

citadel/userlist.c

index f63f9a6c03d7cb7b1f4db5bfb79b106d4b8d269e..b55c1752b46fe365031023a0b46ab608d82b0be7 100644 (file)
@@ -25,6 +25,7 @@
 #include <unistd.h>
 #include "citadel_ipc.h"
 #include "tools.h"
+#include "citadel_dirs.h"
 
 void logoff(int code)
 {
@@ -71,8 +72,14 @@ int main(int argc, char **argv)
        char buf[SIZ];
        char hostbuf[SIZ], portbuf[SIZ];
        CtdlIPC *ipc = NULL;
+       int relh=0;
+       int home=0;
+       char relhome[PATH_MAX]="";
+       char ctdldir[PATH_MAX]=CTDLDIR;
 
        CtdlInitBase64Table();
+       calc_dirs_n_files(relh, home, relhome, ctdldir);
+
        ipc = CtdlIPC_new(argc, argv, hostbuf, portbuf);
        CtdlIPC_chat_recv(ipc, buf);
        if ((buf[0]!='2')&&(strncmp(buf,"551",3))) {