]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Rename interpreter to unlang
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 24 Nov 2016 20:54:05 +0000 (15:54 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 24 Nov 2016 20:54:05 +0000 (15:54 -0500)
src/main/radiusd.mk
src/main/unit_test_map.mk
src/main/unit_test_module.mk
src/main/unlang.c [moved from src/main/interpreter.c with 99% similarity]

index 4db9ebc3edb896dcc3bfa6703a2ce10a9f012aa8..a8ff66e2db610f435c95b3a32e94e41473bbb042 100644 (file)
@@ -5,7 +5,6 @@ SOURCES := acct.c \
     client.c \
     crypt.c \
     files.c \
-    interpreter.c \
     listen.c \
     mainconfig.c \
     modules.c \
@@ -18,6 +17,7 @@ SOURCES := acct.c \
     session.c \
     snmp.c \
     threads.c \
+    unlang.c \
     virtual_servers.c \
     process.c
 
@@ -26,7 +26,7 @@ include ${top_srcdir}/src/main/tls.mk
 SOURCES += tls_listen.c
 endif
 
-SRC_CFLAGS     := 
+SRC_CFLAGS     :=
 
 TGT_INSTALLDIR  := ${sbindir}
 TGT_LDLIBS     := $(LIBS) $(LCRYPT) $(SYSTEMD_LIBS)
index 46e5bd4c309a4fafc43cf75b003f8baf53330a15..f8f29851eb7ffcac21e9342351b3b6b140e967e0 100644 (file)
@@ -1,5 +1,5 @@
 TARGET         := unit_test_map
-SOURCES                := unit_test_map.c ${top_srcdir}/src/main/modcall.c ${top_srcdir}/src/main/interpreter.c
+SOURCES                := unit_test_map.c ${top_srcdir}/src/main/modcall.c ${top_srcdir}/src/main/unlang.c
 
 TGT_PREREQS    := libfreeradius-server.a libfreeradius-radius.a
 TGT_LDLIBS     := $(LIBS)
index eefacf807c6e2561abb36b8418ddd91849686abb..1054930dc4b67a0891fa0b700c33b9834e7b96eb 100644 (file)
@@ -8,13 +8,13 @@ SOURCES := \
        mainconfig.c \
        modules.c \
        modcall.c \
-       interpreter.c \
        unit_test_module.c \
        soh.c \
        state.c \
        session.c \
        version.c  \
        virtual_servers.c \
+       unlang.c \
        realms.c
 
 ifneq ($(OPENSSL_LIBS),)
similarity index 99%
rename from src/main/interpreter.c
rename to src/main/unlang.c
index d6da368713ad808d73315c5f5af4ab18973e3aa7..62adcc158e1ebe178d17a003c9857266ae6d7a7f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * @name interpreter.c
+ * @name unlang.c
  *
  * Version:    $Id$
  *
@@ -666,9 +666,10 @@ static unlang_action_t unlang_module_call(REQUEST *request, unlang_stack_t *stac
 #if 0
        int depth = stack->depth;
 #endif
-       unlang_module_call_t    *sp;
+       unlang_module_call_t            *sp;
        unlang_stack_frame_t            *frame = &stack->frame[stack->depth];
        unlang_t                        *instruction = frame->instruction;
+       module_thread_instance_t        *thread_inst;
 
        /*
         *      Process a stand-alone child, and fall through
@@ -688,13 +689,18 @@ static unlang_action_t unlang_module_call(REQUEST *request, unlang_stack_t *stac
                goto fail;
        }
 
+       /*
+        *      Grab the thread/module specific data if any exists.
+        */
+       thread_inst = module_thread_instance_find(sp->module_instance);
+
        /*
         *      For logging unresponsive children.
         */
        request->module = sp->module_instance->name;
 
        safe_lock(sp->module_instance);
-       request->rcode = sp->method(sp->module_instance->data, NULL, request);
+       request->rcode = sp->method(sp->module_instance->data, thread_inst, request);
        safe_unlock(sp->module_instance);
 
        request->module = NULL;