From 6932bd93b3c66915d9ed55d28a0a9e5b03380922 Mon Sep 17 00:00:00 2001 From: David Schmidt Date: Tue, 5 Mar 2002 22:43:45 +0000 Subject: [PATCH] - Better error reporting on OS/2 - Fix double-slash comment (oops) --- cgi.c | 9 +++++++-- errlog.c | 10 ++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/cgi.c b/cgi.c index 7f99e743..9895505c 100644 --- a/cgi.c +++ b/cgi.c @@ -1,4 +1,4 @@ -const char cgi_rcs[] = "$Id: cgi.c,v 1.42 2002/01/21 00:33:20 jongfoster Exp $"; +const char cgi_rcs[] = "$Id: cgi.c,v 1.43 2002/03/05 21:33:45 david__schmidt Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/cgi.c,v $ @@ -38,6 +38,11 @@ const char cgi_rcs[] = "$Id: cgi.c,v 1.42 2002/01/21 00:33:20 jongfoster Exp $"; * * Revisions : * $Log: cgi.c,v $ + * Revision 1.43 2002/03/05 21:33:45 david__schmidt + * - Re-enable OS/2 building after new parms were added + * - Fix false out of memory report when resolving CGI templates when no IP + * address is available of failed attempt (a la no such domain) + * * Revision 1.42 2002/01/21 00:33:20 jongfoster * Replacing strsav() with the safer string_append() or string_join(). * Adding map_block_keep() to save a few bytes in the edit-actions-list HTML. @@ -693,7 +698,7 @@ struct http_response *error_response(struct client_state *csp, err = map(exports, "host-ip", 1, html_encode(csp->http->host_ip_addr_str), 0); if (err) { - // Some failures, like "404 no such domain", don't have an IP address. + /* Some failures, like "404 no such domain", don't have an IP address. */ err = map(exports, "host-ip", 1, html_encode(csp->http->host), 0); } } diff --git a/errlog.c b/errlog.c index 520cc702..e38c01e3 100644 --- a/errlog.c +++ b/errlog.c @@ -1,4 +1,4 @@ -const char errlog_rcs[] = "$Id: errlog.c,v 1.28 2002/03/04 17:59:59 oes Exp $"; +const char errlog_rcs[] = "$Id: errlog.c,v 1.29 2002/03/04 23:45:13 jongfoster Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/errlog.c,v $ @@ -33,6 +33,9 @@ const char errlog_rcs[] = "$Id: errlog.c,v 1.28 2002/03/04 17:59:59 oes Exp $"; * * Revisions : * $Log: errlog.c,v $ + * Revision 1.29 2002/03/04 23:45:13 jongfoster + * Printing thread ID if using Win32 native threads + * * Revision 1.28 2002/03/04 17:59:59 oes * Deleted deletePidFile(), cosmetics * @@ -472,7 +475,7 @@ void log_error(int loglevel, char *fmt, ...) while ((*src) && (outc < BUFFER_SIZE-2)) { char tempbuf[BUFFER_SIZE]; - char *sval; + char *sval = NULL; int ival; unsigned uval; long lval; @@ -607,6 +610,9 @@ void log_error(int loglevel, char *fmt, ...) sval = w32_socket_strerr(ival, tempbuf); #elif __OS2__ ival = sock_errno(); + if (ival == 0) + ival = errno; + sval = strerror(ival); #else /* ifndef _WIN32 */ ival = errno; #ifdef HAVE_STRERROR -- 2.39.2