]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Didnt compile because request->urlpath is a String.
authorwessels <>
Wed, 8 Apr 1998 05:51:36 +0000 (05:51 +0000)
committerwessels <>
Wed, 8 Apr 1998 05:51:36 +0000 (05:51 +0000)
Added gross strNCmp() macro

src/client_side.cc
src/protos.h

index 73d95c5ff9ea57e4d78b30a46994a527cb5c5206..a361a4ea927e8eaeb85b69b2cbf177f261d28495 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.cc,v 1.260 1998/04/07 23:40:34 rousskov Exp $
+ * $Id: client_side.cc,v 1.261 1998/04/07 23:51:36 wessels Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -1857,8 +1857,8 @@ clientReadRequest(int fd, void *data)
                break;
            }
            if (0 == http->internal)
-               if (0 == strncmp(request->urlpath, "/squid-internal/", 16))
-                   if (0 == strcasecmp(request->host, getMyHostname())
+               if (0 == strNCmp(request->urlpath, "/squid-internal/", 16))
+                   if (0 == strcasecmp(request->host, getMyHostname()))
                        if (request->port == Config.Port.http->i)
                            http->internal = 1;
            safe_free(http->log_uri);
index f12327b140fe6603b90a49db21e922db1205e364..80932fcddc65a893657384fec3f144125af53509 100644 (file)
@@ -880,6 +880,7 @@ void htcpSocketClose(void);
 #define strRChr(s,ch) ((const char*)strrchr(strBuf(s), (ch)))
 #define strStr(s,str) ((const char*)strstr(strBuf(s), (str)))
 #define strCmp(s,str)     strcmp(strBuf(s), (str))
+#define strNCmp(s,str,n)     strncmp(strBuf(s), (str), (n))
 #define strCaseCmp(s,str) strcasecmp(strBuf(s), (str))
 #define strSet(s,ptr,ch) (s).buf[ptr-(s).buf] = (ch)
 #define strCut(s,pos) (s).buf[pos] = '\0'