It looks as if ap_max_mem_free was not originally intended to be exported. But 
if it is going to be used in mod_ssl, it's is going to need to be no?

Linking...

   Creating library .\Release/mod_ssl.lib and object .\Release/mod_ssl.exp
ssl_engine_init.obj : error LNK2001: unresolved external symbol _ap_max_mem_free
.\Release\mod_ssl.so : fatal error LNK1120: 1 unresolved externals

This seems to work for Win & Netware

Index: include/mpm_common.h
===================================================================
--- include/mpm_common.h    (revision 1178660)
+++ include/mpm_common.h    (working copy)
@@ -314,7 +314,7 @@
 int ap_signal_server(int *, apr_pool_t *);
 void ap_mpm_rewrite_args(process_rec *);

-extern apr_uint32_t ap_max_mem_free;
+AP_DECLARE_DATA apr_uint32_t ap_max_mem_free;
 extern const char *ap_mpm_set_max_mem_free(cmd_parms *cmd, void *dummy,
                                            const char *arg);




Cheers,

Gregg

Author: sf
Date: Sat Oct  1 19:48:14 2011
New Revision: 1178079

URL: http://svn.apache.org/viewvc?rev=1178079&view=rev
Log:
If MaxMemFree is set, set SSL_MODE_RELEASE_BUFFERS in mod_ssl.
Always set SSL_MODE_RELEASE_BUFFERS in ab.

PR: 51618
Submitted by: Cristian Rodríguez<crrodriguez opensuse org>, Stefan Fritsch

Modified:
     httpd/httpd/trunk/CHANGES
     httpd/httpd/trunk/modules/ssl/ssl_engine_init.c
     httpd/httpd/trunk/support/ab.c

Modified: httpd/httpd/trunk/modules/ssl/ssl_engine_init.c
URL: 
http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_engine_init.c?rev=1178079&r1=1178078&r2=1178079&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_engine_init.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_engine_init.c Sat Oct  1 19:48:14 2011
@@ -27,6 +27,7 @@
                                    see Recursive.''
                                          -- Unknown   */
  #include "ssl_private.h"
+#include "mpm_common.h"

  /*  _________________________________________________________________
  **
@@ -574,6 +575,12 @@ static void ssl_init_ctx_protocol(server
       */
      SSL_CTX_set_options(ctx, SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION);
  #endif
+
+#ifdef SSL_MODE_RELEASE_BUFFERS
+    /* If httpd is configured to reduce mem usage, ask openssl to do so, too */
+    if (ap_max_mem_free != APR_ALLOCATOR_MAX_FREE_UNLIMITED)
+        SSL_CTX_set_mode(ctx, SSL_MODE_RELEASE_BUFFERS);
+#endif
  }

  static void ssl_init_ctx_session_cache(server_rec *s,

Reply via email to