]> code.citadel.org Git - citadel.git/commitdiff
* whobbs.c: Print error message if we can't connect to server
authorMichael Hampton <io_error@uncensored.citadel.org>
Sat, 25 Jan 2003 07:37:15 +0000 (07:37 +0000)
committerMichael Hampton <io_error@uncensored.citadel.org>
Sat, 25 Jan 2003 07:37:15 +0000 (07:37 +0000)
citadel/ChangeLog
citadel/whobbs.c

index ea1e43183897fcf46f6c4fd20fa82a9ed9d4c7cf..2e9a60036789acee44310e2858e1c27209033e0a 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 601.126  2003/01/25 07:37:15  error
+ * whobbs.c: Print error message if we can't connect to server
+
  Revision 601.125  2003/01/23 05:50:59  ajc
  * citadel.c: hitting enter without entering a room name in the <.G>oto and
    <.S>kip commands now does nothing instead of exhibiting undefined behavior
@@ -4447,4 +4450,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
-
index 60221c4fb3ac20a2d7b4615ce02b7e16dfe30d88..917189a2b2bc410fe0f5064e373658403af8fb65 100644 (file)
@@ -69,6 +69,10 @@ int main(int argc, char **argv)
        if (getenv("REQUEST_METHOD") != NULL) www = 1;
 
        ipc = CtdlIPC_new(argc, argv, hostbuf, portbuf);
+       if (!ipc) {
+               fprintf(stderr, "Server not available: %s\n", strerror(errno));
+               logoff(errno);
+       }
        CtdlIPC_getline(ipc, buf);
        if ((buf[0]!='2')&&(strncmp(buf,"551",3))) {
                fprintf(stderr,"%s: %s\n",argv[0],&buf[4]);