You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by st...@apache.org on 2013/07/15 14:54:24 UTC

svn commit: r1503215 - /perl/modperl/branches/httpd24/src/modules/perl/modperl_util.c

Author: stevehay
Date: Mon Jul 15 12:54:23 2013
New Revision: 1503215

URL: http://svn.apache.org/r1503215
Log:
Restore the early return in perl_parse_require_line() if the key is not found (as per 1503171),
and only call modperl_interp_pool_select() if USE_ITHREADS is #defined.

Modified:
    perl/modperl/branches/httpd24/src/modules/perl/modperl_util.c

Modified: perl/modperl/branches/httpd24/src/modules/perl/modperl_util.c
URL: http://svn.apache.org/viewvc/perl/modperl/branches/httpd24/src/modules/perl/modperl_util.c?rev=1503215&r1=1503214&r2=1503215&view=diff
==============================================================================
--- perl/modperl/branches/httpd24/src/modules/perl/modperl_util.c (original)
+++ perl/modperl/branches/httpd24/src/modules/perl/modperl_util.c Mon Jul 15 12:54:23 2013
@@ -994,21 +994,26 @@ static const char *perl_parse_require_li
     int count;
     void *key;
     auth_callback *ab;
-    modperl_interp_t *interp = modperl_interp_pool_select(cmd->server->process->pool, cmd->server);
-    if (interp) {
-        dTHXa(interp->perl);
-        dSP;
+    modperl_interp_t *interp;
 
-        if (global_authz_providers == NULL) {
-            return ret;
-        }
+    if (global_authz_providers == NULL) {
+        return ret;
+    }
 
-        apr_pool_userdata_get(&key, AUTHZ_PROVIDER_NAME_NOTE, cmd->temp_pool);
-        ab = apr_hash_get(global_authz_providers, (char *) key, APR_HASH_KEY_STRING);
-        if (ab == NULL || ab->cb2 == NULL) {
-            return ret;
-        }
+    apr_pool_userdata_get(&key, AUTHZ_PROVIDER_NAME_NOTE, cmd->temp_pool);
+    ab = apr_hash_get(global_authz_providers, (char *) key, APR_HASH_KEY_STRING);
+    if (ab == NULL || ab->cb2 == NULL) {
+        return ret;
+    }
 
+#ifdef USE_ITHREADS
+    interp = modperl_interp_pool_select(cmd->server->process->pool, cmd->server);
+    if (interp) {
+        dTHXa(interp->perl);
+#else
+    {
+#endif
+        dSP;
         ENTER;
         SAVETMPS;
         PUSHMARK(SP);