]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
assertions and more debug
authorAlan T. DeKok <aland@freeradius.org>
Tue, 23 Mar 2021 12:23:31 +0000 (08:23 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 31 Mar 2021 15:09:43 +0000 (16:09 +0100)
src/lib/server/process.h

index d47d042b019021e35c4d777e2bc3425b9e34ca7a..d885a652f6b6c6fc74c3e2a4f4bed60c4b6903f4 100644 (file)
@@ -118,7 +118,11 @@ RECV(generic)
                RETURN_MODULE_FAIL;
        }
 
-       if (cs) RDEBUG("Running 'recv %s' from file %s", cf_section_name2(cs), cf_filename(cs));
+
+       if (cs) {
+               RDEBUG("Running 'recv %s' from file %s", cf_section_name2(cs), cf_filename(cs));
+               fr_assert(strcmp(cf_section_name1(cs), "recv") == 0);
+       }
        return unlang_module_yield_to_section(p_result, request,
                                              cs, state->rcode, state->resume,
                                              NULL, NULL);
@@ -194,6 +198,11 @@ SEND(generic)
                MEM(0);
        }
 
+       if (cs) {
+               RDEBUG("Running 'send %s' from file %s", cf_section_name2(cs), cf_filename(cs));
+               fr_assert(strcmp(cf_section_name1(cs), "send") == 0);
+       }
+
        return unlang_module_yield_to_section(p_result, request,
                                              cs, state->rcode, state->resume,
                                              NULL, rctx);