]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
fixes
authorwessels <>
Fri, 21 Aug 1998 01:52:27 +0000 (01:52 +0000)
committerwessels <>
Fri, 21 Aug 1998 01:52:27 +0000 (01:52 +0000)
test-suite/tcp-banger2.c

index 424813e73dd640548446ac19ec722e9ab42e6507..84e7dcfd237c0242856cff606bc974ae6c9d2fc8 100644 (file)
@@ -281,6 +281,8 @@ request(char *urlin)
     struct stat st;
     struct sockaddr_in S;
     struct _request *r;
+    if (*urlin == '\0')
+       return NULL;
     if ((s = socket(PF_INET, SOCK_STREAM, 0)) < 0) {
        perror("socket");
        return NULL;
@@ -402,12 +404,15 @@ read_url(int fd, void *junk)
     struct _request *r;
     static char buf[8192];
     char *t;
+    buf[0] = '\0';
     if (fgets(buf, 8191, stdin) == NULL) {
        printf("Done Reading URLS\n");
        fd_close(0);
        nfds++;
        return;
     }
+    if (buf[0] == '\0')
+       return;
     if ((t = strchr(buf, '\n')))
        *t = '\0';
     r = request(buf);