diff options
author | William A. Rowe Jr <wrowe@apache.org> | 2000-10-06 19:24:43 +0200 |
---|---|---|
committer | William A. Rowe Jr <wrowe@apache.org> | 2000-10-06 19:24:43 +0200 |
commit | cbd58ab0bd8263741966eb116170aabf69a8b14c (patch) | |
tree | 88a57c93302f5587e088c481d00244b66f3d4f05 /os | |
parent | Fix a potential memory overrun error in ap_get_client_block. The problem (diff) | |
download | apache2-cbd58ab0bd8263741966eb116170aabf69a8b14c.tar.xz apache2-cbd58ab0bd8263741966eb116170aabf69a8b14c.zip |
Here it is, the Win32 part of the big canonical errors patch.
The reason is really, really simple. If we ever choose to mix clib and
dos error codes, they criss-cross and don't line up, but they share the
same number space. As I wrote the new APR_IS_ERROR macros, I realized
we were about to shoot ourselves in the foot.
These changes nearly entirely affect Win32 only. The next big patch will
affect all of the rv == APR_ENOENT type problems throughout the system.
PR:
Obtained from:
Submitted by:
Reviewed by:
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86416 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'os')
-rw-r--r-- | os/win32/mod_isapi.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/os/win32/mod_isapi.c b/os/win32/mod_isapi.c index 6e7e39fb01..9470b27d85 100644 --- a/os/win32/mod_isapi.c +++ b/os/win32/mod_isapi.c @@ -280,8 +280,8 @@ static apr_status_t isapi_load(apr_pool_t *p, isapi_server_conf *sconf, if (!(*isa)->handle) { - apr_status_t rv = GetLastError(); - ap_log_rerror(APLOG_MARK, APLOG_ALERT, GetLastError(), r, + apr_status_t rv = apr_get_os_error(); + ap_log_rerror(APLOG_MARK, APLOG_ALERT, apr_get_os_error(), r, "ISAPI %s failed to load", fpath); (*isa)->handle = NULL; return rv; @@ -290,7 +290,7 @@ static apr_status_t isapi_load(apr_pool_t *p, isapi_server_conf *sconf, if (!((*isa)->GetExtensionVersion = (void *)(GetProcAddress((*isa)->handle, "GetExtensionVersion")))) { - apr_status_t rv = GetLastError(); + apr_status_t rv = apr_get_os_error(); ap_log_rerror(APLOG_MARK, APLOG_ALERT, rv, r, "ISAPI %s is missing GetExtensionVersion()", fpath); @@ -302,7 +302,7 @@ static apr_status_t isapi_load(apr_pool_t *p, isapi_server_conf *sconf, if (!((*isa)->HttpExtensionProc = (void *)(GetProcAddress((*isa)->handle, "HttpExtensionProc")))) { - apr_status_t rv = GetLastError(); + apr_status_t rv = apr_get_os_error(); ap_log_rerror(APLOG_MARK, APLOG_ALERT, rv, r, "ISAPI %s is missing HttpExtensionProc()", fpath); @@ -318,7 +318,7 @@ static apr_status_t isapi_load(apr_pool_t *p, isapi_server_conf *sconf, /* Run GetExtensionVersion() */ if (!((*isa)->GetExtensionVersion)((*isa)->pVer)) { - apr_status_t rv = GetLastError(); + apr_status_t rv = apr_get_os_error(); ap_log_rerror(APLOG_MARK, APLOG_ALERT, rv, r, "ISAPI %s call GetExtensionVersion() failed", fpath); @@ -688,8 +688,8 @@ BOOL WINAPI ReadClient (HCONN ConnID, LPVOID lpvBuffer, LPDWORD lpdwSize) *lpdwSize - read)) > 0)) { if (res < 0) { *lpdwSize = 0; - if (!GetLastError()) - SetLastError(TODO_ERROR); /* XXX: Find the right error code */ + if (!apr_get_os_error()) + apr_set_os_error(TODO_ERROR); /* XXX: Find the right error code */ return FALSE; } |