moonbridge

changeset 6:0449f6a4005f

Terminate server at startup if no listener is installed
author jbe
date Wed Jan 14 12:32:11 2015 +0100 (2015-01-14)
parents 4b6d7ca25381
children 4d7551c962d5
files moonbridge.c
line diff
     1.1 --- a/moonbridge.c	Sun Jan 11 23:18:12 2015 +0100
     1.2 +++ b/moonbridge.c	Wed Jan 14 12:32:11 2015 +0100
     1.3 @@ -2705,6 +2705,10 @@
     1.4        moonbr_log(LOG_ERR, "Error while executing \"%s\": %s", argv[optind], lua_tostring(L, -1));
     1.5        moonbr_terminate_error();
     1.6      }
     1.7 +    if (!moonbr_first_pool) {
     1.8 +      moonbr_log(LOG_WARNING, "No listener initialized.");
     1.9 +      moonbr_terminate_error();
    1.10 +    }
    1.11      lua_getglobal(L, "listen");
    1.12      lua_pushcfunction(L, moonbr_listen);
    1.13      if (lua_compare(L, -2, -1, LUA_OPEQ)) {

Impressum / About Us