httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1026660 - in /httpd/httpd/trunk/modules: aaa/mod_auth_basic.c aaa/mod_auth_digest.c aaa/mod_authn_core.c aaa/mod_authz_core.c metadata/mod_remoteip.c metadata/mod_usertrack.c
Date Sat, 23 Oct 2010 18:35:06 GMT
Author: sf
Date: Sat Oct 23 18:35:06 2010
New Revision: 1026660

URL: http://svn.apache.org/viewvc?rev=1026660&view=rev
Log:
more temp pool usage and remove some useless apr_pstrdup()s

Modified:
    httpd/httpd/trunk/modules/aaa/mod_auth_basic.c
    httpd/httpd/trunk/modules/aaa/mod_auth_digest.c
    httpd/httpd/trunk/modules/aaa/mod_authn_core.c
    httpd/httpd/trunk/modules/aaa/mod_authz_core.c
    httpd/httpd/trunk/modules/metadata/mod_remoteip.c
    httpd/httpd/trunk/modules/metadata/mod_usertrack.c

Modified: httpd/httpd/trunk/modules/aaa/mod_auth_basic.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/aaa/mod_auth_basic.c?rev=1026660&r1=1026659&r2=1026660&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/aaa/mod_auth_basic.c (original)
+++ httpd/httpd/trunk/modules/aaa/mod_auth_basic.c Sat Oct 23 18:35:06 2010
@@ -56,7 +56,7 @@ static const char *add_authn_provider(cm
     authn_provider_list *newp;
 
     newp = apr_pcalloc(cmd->pool, sizeof(authn_provider_list));
-    newp->provider_name = apr_pstrdup(cmd->pool, arg);
+    newp->provider_name = arg;
 
     /* lookup and cache the actual provider now */
     newp->provider = ap_lookup_provider(AUTHN_PROVIDER_GROUP,

Modified: httpd/httpd/trunk/modules/aaa/mod_auth_digest.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/aaa/mod_auth_digest.c?rev=1026660&r1=1026659&r2=1026660&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/aaa/mod_auth_digest.c (original)
+++ httpd/httpd/trunk/modules/aaa/mod_auth_digest.c Sat Oct 23 18:35:06 2010
@@ -506,7 +506,7 @@ static const char *add_authn_provider(cm
     authn_provider_list *newp;
 
     newp = apr_pcalloc(cmd->pool, sizeof(authn_provider_list));
-    newp->provider_name = apr_pstrdup(cmd->pool, arg);
+    newp->provider_name = arg;
 
     /* lookup and cache the actual provider now */
     newp->provider = ap_lookup_provider(AUTHN_PROVIDER_GROUP,

Modified: httpd/httpd/trunk/modules/aaa/mod_authn_core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/aaa/mod_authn_core.c?rev=1026660&r1=1026659&r2=1026660&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/aaa/mod_authn_core.c (original)
+++ httpd/httpd/trunk/modules/aaa/mod_authn_core.c Sat Oct 23 18:35:06 2010
@@ -215,7 +215,7 @@ static const char *authaliassection(cmd_
                            "> directive missing closing '>'", NULL);
     }
 
-    args = apr_pstrndup(cmd->pool, arg, endp - arg);
+    args = apr_pstrndup(cmd->temp_pool, arg, endp - arg);
 
     if (!args[0]) {
         return apr_pstrcat(cmd->pool, cmd->cmd->name,

Modified: httpd/httpd/trunk/modules/aaa/mod_authz_core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/aaa/mod_authz_core.c?rev=1026660&r1=1026659&r2=1026660&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/aaa/mod_authz_core.c (original)
+++ httpd/httpd/trunk/modules/aaa/mod_authz_core.c Sat Oct 23 18:35:06 2010
@@ -233,7 +233,7 @@ static const char *authz_require_alias_s
                            "> directive missing closing '>'", NULL);
     }
 
-    args = apr_pstrndup(cmd->pool, args, endp - args);
+    args = apr_pstrndup(cmd->temp_pool, args, endp - args);
 
     if (!args[0]) {
         return apr_pstrcat(cmd->pool, cmd->cmd->name,
@@ -428,7 +428,7 @@ static const char *add_authz_section(cmd
                            "> directive missing closing '>'", NULL);
     }
 
-    args = apr_pstrndup(cmd->pool, args, endp - args);
+    args = apr_pstrndup(cmd->temp_pool, args, endp - args);
 
     if (args[0]) {
         return apr_pstrcat(cmd->pool, cmd->cmd->name,

Modified: httpd/httpd/trunk/modules/metadata/mod_remoteip.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/metadata/mod_remoteip.c?rev=1026660&r1=1026659&r2=1026660&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/metadata/mod_remoteip.c (original)
+++ httpd/httpd/trunk/modules/metadata/mod_remoteip.c Sat Oct 23 18:35:06 2010
@@ -99,7 +99,7 @@ static const char *header_name_set(cmd_p
 {
     remoteip_config_t *config = ap_get_module_config(cmd->server->module_config,
                                                      &remoteip_module);
-    config->header_name = apr_pstrdup(cmd->pool, arg);
+    config->header_name = arg;
     return NULL;
 }
 
@@ -108,7 +108,7 @@ static const char *proxies_header_name_s
 {
     remoteip_config_t *config = ap_get_module_config(cmd->server->module_config,
                                                      &remoteip_module);
-    config->proxies_header_name = apr_pstrdup(cmd->pool, arg);
+    config->proxies_header_name = arg;
     return NULL;
 }
 

Modified: httpd/httpd/trunk/modules/metadata/mod_usertrack.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/metadata/mod_usertrack.c?rev=1026660&r1=1026659&r2=1026660&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/metadata/mod_usertrack.c (original)
+++ httpd/httpd/trunk/modules/metadata/mod_usertrack.c Sat Oct 23 18:35:06 2010
@@ -81,8 +81,8 @@ typedef enum {
 typedef struct {
     int enabled;
     cookie_type_e style;
-    char *cookie_name;
-    char *cookie_domain;
+    const char *cookie_name;
+    const char *cookie_domain;
     char *regexp_string;  /* used to compile regexp; save for debugging */
     ap_regex_t *regexp;  /* used to find usertrack cookie in cookie header */
 } cookie_dir_rec;
@@ -352,7 +352,7 @@ static const char *set_cookie_name(cmd_p
 {
     cookie_dir_rec *dcfg = (cookie_dir_rec *) mconfig;
 
-    dcfg->cookie_name = apr_pstrdup(cmd->pool, name);
+    dcfg->cookie_name = name;
 
     set_and_comp_regexp(dcfg, cmd->pool, name);
 
@@ -390,7 +390,7 @@ static const char *set_cookie_domain(cmd
         return "CookieDomain values must contain at least one embedded dot";
     }
 
-    dcfg->cookie_domain = apr_pstrdup(cmd->pool, name);
+    dcfg->cookie_domain = name;
     return NULL;
 }
 



Mime
View raw message