]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
*** empty log message ***
authorkostas <>
Sat, 18 Oct 1997 03:19:55 +0000 (03:19 +0000)
committerkostas <>
Sat, 18 Oct 1997 03:19:55 +0000 (03:19 +0000)
src/errorpage.cc
src/fd.cc

index 7b718e1a81d9456e42eca248f7bd6d292ab2c32c..31488a40f57d23d1f8f8191faa1800df0789c73b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: errorpage.cc,v 1.76 1997/10/17 04:00:11 wessels Exp $
+ * $Id: errorpage.cc,v 1.77 1997/10/17 21:22:46 kostas Exp $
  *
  * DEBUG: section 4     Error Generation
  * AUTHOR: Duane Wessels
@@ -132,12 +132,18 @@ errorConvert(char token, ErrorState * err)
        break;
     case 'E':
        snprintf(buf, CVT_BUF_SZ, "(%d) %s", err->errno, strerror(err->errno));
+       p = buf;
        break;
     case 'w':
-       snprintf(buf, CVT_BUF_SZ, "%s", Config.adminEmail);
+       if (Config.adminEmail) {
+           snprintf(buf, CVT_BUF_SZ, "%s", Config.adminEmail);
+           p = buf;
+       } else
+           p = "UNKNOWN";
        break;
     case 'h':
        snprintf(buf, CVT_BUF_SZ, "%s", getMyHostname());
+       p = buf;
        break;
 /*
  * e - errno                                  x
index 8c8cfa047ba806b3668952a2b3cbd18394acfad5..a98d4794db31113daab8b4be257e3155df274e07 100644 (file)
--- a/src/fd.cc
+++ b/src/fd.cc
@@ -36,6 +36,7 @@ void
 fd_open(int fd, unsigned int type, const char *desc)
 {
     fde *F = &fd_table[fd];
+    assert(fd >= 0);
     assert(F->open == 0);
     F->type = type;
     fdUpdateBiggest(fd, F->open = FD_OPEN);