]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
use correct process ptr
authorAlan T. DeKok <aland@freeradius.org>
Thu, 14 Sep 2017 23:09:18 +0000 (19:09 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 14 Sep 2017 23:30:32 +0000 (19:30 -0400)
src/main/unlang_compile.c

index 124ca89855df9e3ca850c86d5c994687465dd8e1..e2517f8581d3c08633002416eb6a8b6a01446e9c 100644 (file)
@@ -2567,6 +2567,7 @@ static unlang_t *compile_call(unlang_t *parent, unlang_compile_t *unlang_ctx, CO
        char *server;
        char *packet;
        CONF_SECTION *server_cs, *root;
+       fr_io_process_t *process_p;
 
        /*
         *      calls with a normal packet are not allowed.  It will
@@ -2651,14 +2652,16 @@ static unlang_t *compile_call(unlang_t *parent, unlang_compile_t *unlang_ctx, CO
         *      Verify it exists, but don't bother caching it.  We can
         *      figure it out at run-time.
         */
-       g->process = cf_data_find(server_cs, fr_io_process_t, packet);
-       if (!g->process) {
+       process_p = (fr_io_process_t *) cf_data_value(cf_data_find(server_cs, fr_io_process_t, packet));
+       if (!process_p) {
                cf_log_err(cs, "Virtual server %s cannot process '%s' packets",
                           cf_section_name2(server_cs), packet);
                talloc_free(g);
                return NULL;
        }
 
+       g->process = *process_p;
+
        c = unlang_group_to_generic(g);
        c->name = unlang_ops[c->type].name;
        c->debug_name = c->name;