]> arthur.barton.de Git - ngircd.git/commitdiff
Fix return code of Conf_EnableServer()
authorAlexander Barton <alex@barton.de>
Fri, 17 Jul 2009 12:55:30 +0000 (14:55 +0200)
committerAlexander Barton <alex@barton.de>
Fri, 17 Jul 2009 12:55:30 +0000 (14:55 +0200)
Conf_EnableServer() only reports success if all required variables,
including host name and port, are set for the specific server.

src/ngircd/conf.c

index a3c9afecf097c88de0fc55e9b1ac44aebb9c25b0..eccf13cc3edec2a78d533287c2d92a18ce2345ce 100644 (file)
@@ -400,7 +400,7 @@ Conf_EnableServer( const char *Name, UINT16 Port )
                        /* Gotcha! Set port and enable server: */
                        Conf_Server[i].port = Port;
                        Conf_Server[i].flags &= ~CONF_SFLAG_DISABLED;
-                       return true;
+                       return (Conf_Server[i].port && Conf_Server[i].host[0]);
                }
        }
        return false;