]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
print out which listener had the error
authorAlan T. DeKok <aland@freeradius.org>
Mon, 29 May 2023 14:32:04 +0000 (10:32 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 29 May 2023 14:43:05 +0000 (10:43 -0400)
src/lib/server/virtual_servers.c

index f57166adb903dbcb2d75bbe66332ecbd5c345498..875d53d7f3be639f99e327d1140d44dcad4ad390 100644 (file)
@@ -429,7 +429,10 @@ static int listen_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent,
        qual_inst_name = talloc_asprintf(NULL, "%s.%s", cf_section_name2(server_cs), inst_name);
        mi = module_alloc(proto_modules, NULL, DL_MODULE_TYPE_PROTO, mod_name, qual_inst_name);
        talloc_free(qual_inst_name);
-       if (mi == NULL) return -1;
+       if (!mi) {
+               cf_log_err(listener_cs, "Failed loading listener");
+               return -1;
+       }
 
        if (DEBUG_ENABLED4) cf_log_debug(ci, "Loading %s listener into %p", inst_name, out);