From: Arran Cudbard-Bell Date: Thu, 24 Nov 2016 20:54:05 +0000 (-0500) Subject: Rename interpreter to unlang X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d26ac83b0ee49f85ed7cbf0d09eeaba614ef650c;p=thirdparty%2Ffreeradius-server.git Rename interpreter to unlang --- diff --git a/src/main/radiusd.mk b/src/main/radiusd.mk index 4db9ebc3edb..a8ff66e2db6 100644 --- a/src/main/radiusd.mk +++ b/src/main/radiusd.mk @@ -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) diff --git a/src/main/unit_test_map.mk b/src/main/unit_test_map.mk index 46e5bd4c309..f8f29851eb7 100644 --- a/src/main/unit_test_map.mk +++ b/src/main/unit_test_map.mk @@ -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) diff --git a/src/main/unit_test_module.mk b/src/main/unit_test_module.mk index eefacf807c6..1054930dc4b 100644 --- a/src/main/unit_test_module.mk +++ b/src/main/unit_test_module.mk @@ -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),) diff --git a/src/main/interpreter.c b/src/main/unlang.c similarity index 99% rename from src/main/interpreter.c rename to src/main/unlang.c index d6da368713a..62adcc158e1 100644 --- a/src/main/interpreter.c +++ b/src/main/unlang.c @@ -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;