]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Don't ignore SSL-related errors during startup
authorAlexander Barton <alex@barton.de>
Sun, 15 Sep 2013 22:31:03 +0000 (00:31 +0200)
committerAlexander Barton <alex@barton.de>
Sun, 15 Sep 2013 22:31:03 +0000 (00:31 +0200)
Without this patch, ngIRCd ignores SSL-related messages and continues
to start up but only listens on plain text communication ports -- and
this most probably isn't what the administrator wanted ...

Closes bug #163.

src/ngircd/ngircd.c

index f0cb15045993b9a5df1d587f7d19d343c4cc6797..d76b47d4ba86dbf3969dfbae1544701c0e4d9608 100644 (file)
@@ -264,7 +264,7 @@ main(int argc, const char *argv[])
                /* Initialize the "main program": chroot environment, user and
                 * group ID, ... */
                if (!NGIRCd_Init(NGIRCd_NoDaemon)) {
-                       Log(LOG_ALERT, "Fatal: Initialization failed");
+                       Log(LOG_ALERT, "Fatal: Initialization failed, exiting!");
                        exit(1);
                }
 
@@ -673,9 +673,10 @@ NGIRCd_Init(bool NGIRCd_NoDaemon)
        }
 
        /* SSL initialization */
-       if (!ConnSSL_InitLibrary())
-               Log(LOG_WARNING,
-                   "Error during SSL initialization, continuing without SSL ...");
+       if (!ConnSSL_InitLibrary()) {
+               Log(LOG_ERR, "Error during SSL initialization!");
+               goto out;
+       }
 
        /* Change root */
        if (Conf_Chroot[0]) {