1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-05 16:55:50 +03:00

don't let thread-scope be selected in a server w/o threads

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1200977 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Eric Covener
2011-11-11 17:30:18 +00:00
parent 45b5bfb549
commit 727cca9fdb

View File

@@ -857,14 +857,23 @@ static const char *register_lua_scope(cmd_parms *cmd,
cfg->vm_scope = AP_LUA_SCOPE_CONN; cfg->vm_scope = AP_LUA_SCOPE_CONN;
} }
else if (strcmp("thread", scope) == 0) { else if (strcmp("thread", scope) == 0) {
#if !APR_HAS_THREADS
return apr_psprintf(cmd->pool,
"Scope type of '%s' cannot be used because this "
"server does not have threading support "
"(APR_HAS_THREADS)"
scope);
#endif
cfg->vm_scope = AP_LUA_SCOPE_THREAD; cfg->vm_scope = AP_LUA_SCOPE_THREAD;
} }
else { else {
return apr_psprintf(cmd->pool, return apr_psprintf(cmd->pool,
"Invalid value for LuaScope, '%s', acceptable " "Invalid value for LuaScope, '%s', acceptable "
"values are 'once', 'request', 'conn', and " "values are: 'once', 'request', 'conn', 'server'"
"'server'", #if APR_HAS_THREADS
scope); ", 'thread'"
#endif
,scope);
} }
return NULL; return NULL;
} }