From: Guus Sliepen Date: Mon, 24 Sep 2012 12:02:07 +0000 (+0200) Subject: Attribution for Vil Brekin and some code style cleanups. X-Git-Tag: release-1.1pre3~36^2~5 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=66e702d90d83977dc089736d7e4146330bc5df28;p=oweals%2Ftinc.git Attribution for Vil Brekin and some code style cleanups. --- diff --git a/THANKS b/THANKS index 9c02e93..8da657c 100644 --- a/THANKS +++ b/THANKS @@ -44,6 +44,7 @@ We would like to thank the following people for their contributions to tinc: * Teemu Kiviniemi * Timothy Redaelli * Tonnerre Lombard +* Vil Brekin * Wessel Dankers * Wouter van Heyst diff --git a/src/process.c b/src/process.c index a682226..262b092 100644 --- a/src/process.c +++ b/src/process.c @@ -358,7 +358,7 @@ bool execute_script(const char *name, char **envp) { int status, len; char *scriptname; int i; - char *aInterpreter = NULL; + char *interpreter = NULL; #ifndef HAVE_MINGW len = xasprintf(&scriptname, "\"%s/%s\"", confbase, name); @@ -379,19 +379,15 @@ bool execute_script(const char *name, char **envp) { } #endif - // Custom scripts interpreter - if(get_config_string(lookup_config(config_tree, "ScriptsInterpreter"), &aInterpreter)) - { - // Force custom scripts interpreter allowing execution of scripts on android without execution flag (such as on /sdcard) - free(scriptname); - len = xasprintf(&scriptname, "%s \"%s/%s\"", aInterpreter, confbase, name); - if(len < 0) - { - free(aInterpreter); - return false; - } - } - free(aInterpreter); + // Custom scripts interpreter + if(get_config_string(lookup_config(config_tree, "ScriptsInterpreter"), &interpreter)) { + // Force custom scripts interpreter allowing execution of scripts on android without execution flag (such as on /sdcard) + free(scriptname); + len = xasprintf(&scriptname, "%s \"%s/%s\"", interpreter, confbase, name); + free(interpreter); + if(len < 0) + return false; + } ifdebug(STATUS) logger(LOG_INFO, "Executing script %s", name);