httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaillet...@apache.org
Subject svn commit: r1745835 - /httpd/httpd/trunk/modules/mappers/mod_userdir.c
Date Sat, 28 May 2016 05:54:19 GMT
Author: jailletc36
Date: Sat May 28 05:54:19 2016
New Revision: 1745835

URL: http://svn.apache.org/viewvc?rev=1745835&view=rev
Log:
Constify and save a few bytes in the conf pool when parsing "UserDir" directive

Modified:
    httpd/httpd/trunk/modules/mappers/mod_userdir.c

Modified: httpd/httpd/trunk/modules/mappers/mod_userdir.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_userdir.c?rev=1745835&r1=1745834&r2=1745835&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_userdir.c (original)
+++ httpd/httpd/trunk/modules/mappers/mod_userdir.c Sat May 28 05:54:19 2016
@@ -89,7 +89,7 @@ module AP_MODULE_DECLARE_DATA userdir_mo
 
 typedef struct {
     int globally_disabled;
-    char *userdir;
+    const char *userdir;
     apr_table_t *enabled_users;
     apr_table_t *disabled_users;
 } userdir_config;
@@ -137,7 +137,7 @@ static const char *set_user_dir(cmd_parm
                                                  &userdir_module);
     char *username;
     const char *usernames = arg;
-    char *kw = ap_getword_conf(cmd->pool, &usernames);
+    char *kw = ap_getword_conf(cmd->temp_pool, &usernames);
     apr_table_t *usertable;
 
     /* Since we are a raw argument, it is possible for us to be called with
@@ -173,7 +173,7 @@ static const char *set_user_dir(cmd_parm
          * If the first (only?) value isn't one of our keywords, just copy
          * the string to the userdir string.
          */
-        s_cfg->userdir = apr_pstrdup(cmd->pool, arg);
+        s_cfg->userdir = arg;
         return NULL;
     }
     /*
@@ -182,7 +182,7 @@ static const char *set_user_dir(cmd_parm
      */
     while (*usernames) {
         username = ap_getword_conf(cmd->pool, &usernames);
-        apr_table_setn(usertable, username, kw);
+        apr_table_setn(usertable, username, "1");
     }
     return NULL;
 }



Mime
View raw message