]> granicus.if.org Git - apache/commitdiff
Follow up to r1685052: use retained data pattern instead,
authorYann Ylavic <ylavic@apache.org>
Fri, 12 Jun 2015 12:31:13 +0000 (12:31 +0000)
committerYann Ylavic <ylavic@apache.org>
Fri, 12 Jun 2015 12:31:13 +0000 (12:31 +0000)
as suggested by trawick.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1685078 13f79535-47bb-0310-9956-ffa450edef68

modules/ssl/ssl_engine_config.c

index c4320c9c7aefe437a83ba84822bda0e090ba37ff..5112451db2dc881cc1caad015661246ec3cbceb2 100644 (file)
@@ -839,21 +839,17 @@ const char *ssl_cmd_SSLCertificateChainFile(cmd_parms *cmd,
                                             const char *arg)
 {
     SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
-    void *once = NULL;
     const char *err;
 
-    apr_pool_userdata_get(&once, "ssl_cmd_SSLCertificateChainFile",
-                          ap_pglobal);
-    if (!once) {
+    const char *once_key = "ssl_cmd_SSLCertificateChainFile";
+    if (!ap_retained_data_get(once_key)) {
+        ap_retained_data_create(once_key, sizeof(char));
+
         ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_STARTUP, 0, NULL,
                      APLOGNO(02559)
                      "The SSLCertificateChainFile directive (%s:%d) is "
                      "deprecated, SSLCertificateFile should be used instead",
                      cmd->directive->filename, cmd->directive->line_num);
-
-        apr_pool_userdata_set("ssl_cmd_SSLCertificateChainFile",
-                              apr_pstrdup(ap_pglobal, "1"), NULL,
-                              ap_pglobal);
     }
 
     if ((err = ssl_cmd_check_file(cmd, &arg))) {