]> code.citadel.org Git - citadel.git/blobdiff - citadel/whobbs.c
* The size constant "256" which shows up everywhere as a buffer size has now
[citadel.git] / citadel / whobbs.c
index a9106eba3088df4cb8ae3a295e55c22435f7f29d..f22c8f0310a10458781659852b542cdbdc27c814 100644 (file)
@@ -1,4 +1,10 @@
-/* $Id$ */
+/*
+ * $Id$
+ * 
+ * Command-line "who is online?" utility
+ *
+ */
+
 #include <stdlib.h>
 #include <unistd.h>
 #include <stdio.h>
@@ -37,17 +43,17 @@ void escapize(char buf[]) {
 int main(int argc, char **argv)
 {
        char buf[512];
-       char nodetitle[256];
+       char nodetitle[SIZ];
        int a;
        int www = 0;
        int s_pid = 0;
        int my_pid = 0;
-       char hostbuf[256];
-       char portbuf[256];
-       char s_user[256];
-       char s_room[256];
-       char s_host[256];
-       char s_client[256];
+       char hostbuf[SIZ];
+       char portbuf[SIZ];
+       char s_user[SIZ];
+       char s_room[SIZ];
+       char s_host[SIZ];
+       char s_client[SIZ];
 
        /* If this environment variable is set, we assume that the program
         * is being called as a cgi-bin from a webserver and will output
@@ -55,7 +61,7 @@ int main(int argc, char **argv)
         */     
        if (getenv("REQUEST_METHOD") != NULL) www = 1;
 
-       attach_to_server(argc,argv, hostbuf, portbuf);
+       attach_to_server(argc, argv, hostbuf, portbuf);
        serv_gets(buf);
        if ((buf[0]!='2')&&(strncmp(buf,"551",3))) {
                fprintf(stderr,"%s: %s\n",argv[0],&buf[4]);