www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernhard Schrenk <b.schr...@improx.com>
Subject build/7612: mod_tls does not compile and asserts under windows
Date Tue, 24 Apr 2001 14:03:33 GMT

>Number:         7612
>Category:       build
>Synopsis:       mod_tls does not compile and asserts under windows
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Tue Apr 24 07:10:01 PDT 2001
>Originator:     b.schrenk@improx.com
>Release:        2.0.16beta
Microsoft Windows 2000
Microsoft Visual C++ 6.0 SP4
mod_tls does not compile under windows with microsoft compiler
After minor code changes mod_tls compiled, but asserts when reading data from client, caused
by the return code WSAEWOULDBLOCK from Windows Socket Library during nono blocking network
IO. Expected by mod_tls is EAGAIN.
Compile mod_tls under windows with microsoft compiler
I have patched mod_tls, but I don't know if I used the apr macro APR_STATUS_IS_EAGAIN(ret)
and the macro AP_MODULE_DECLARE_DATA correctly. Patch follows:

diff -uP tls.old/mod_tls.c tls/mod_tls.c
--- tls.old/mod_tls.c	Wed Apr  4 01:36:06 2001
+++ tls/mod_tls.c	Tue Apr 24 13:12:03 2001
@@ -68,7 +68,7 @@
 // temp
 #include <assert.h>
-AP_DECLARE_DATA module tls_module;
+module AP_MODULE_DECLARE_DATA tls_module;
 static const char s_szTLSFilterName[]="TLSFilter";
 typedef struct
@@ -234,7 +234,7 @@
 			     "Read failed in tls_in_filter");
 	    assert(eReadType == APR_NONBLOCK_READ);
-	    assert(ret == APR_SUCCESS || ret == APR_EAGAIN);
+	    assert(ret == APR_SUCCESS || APR_STATUS_IS_EAGAIN(ret));
 	    /* In this case, we have data in the output bucket, or we were
 	     * non-blocking, so returning nothing is fine.
@@ -401,7 +401,7 @@
-AP_DECLARE_DATA module tls_module = {
+module AP_MODULE_DECLARE_DATA tls_module = {
     NULL,			/* create per-directory config structure */
     NULL,			/* merge per-directory config structures */

diff -uP tls.old/openssl_state_machine.c tls/openssl_state_machine.c
--- tls.old/openssl_state_machine.c	Wed Apr  4 01:36:06 2001
+++ tls/openssl_state_machine.c	Tue Apr 24 13:33:11 2001
@@ -78,7 +78,9 @@
 #include <openssl/ssl.h>
 #include <assert.h>
+#ifndef WIN32
 #include <unistd.h>
 #include <string.h>
 #include <openssl/err.h>
 #include "openssl_state_machine.h"
 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]

View raw message