httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1200983 - /httpd/httpd/branches/2.4.x/modules/lua/mod_lua.c
Date Fri, 11 Nov 2011 17:38:11 GMT
Author: jim
Date: Fri Nov 11 17:38:11 2011
New Revision: 1200983

URL: http://svn.apache.org/viewvc?rev=1200983&view=rev
Log:
Merge r1200977 from trunk:

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


Submitted by: covener
Reviewed/backported by: jim

Modified:
    httpd/httpd/branches/2.4.x/modules/lua/mod_lua.c

Modified: httpd/httpd/branches/2.4.x/modules/lua/mod_lua.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/lua/mod_lua.c?rev=1200983&r1=1200982&r2=1200983&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/lua/mod_lua.c (original)
+++ httpd/httpd/branches/2.4.x/modules/lua/mod_lua.c Fri Nov 11 17:38:11 2011
@@ -857,14 +857,23 @@ static const char *register_lua_scope(cm
         cfg->vm_scope = AP_LUA_SCOPE_CONN;
     }
     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;
     }
     else {
         return apr_psprintf(cmd->pool,
                             "Invalid value for LuaScope, '%s', acceptable "
-                            "values are 'once', 'request', 'conn', and "
-                            "'server'",
-                            scope);
+                            "values are: 'once', 'request', 'conn', 'server'"
+#if APR_HAS_THREADS
+                            ", 'thread'"
+#endif
+                            ,scope);
     }
     return NULL;
 }



Mime
View raw message