]> granicus.if.org Git - libevent/commitdiff
Fix at least two bugs that are keeping the HTTP regression tests from running on...
authorNick Mathewson <nickm@torproject.org>
Fri, 28 Dec 2007 00:34:05 +0000 (00:34 +0000)
committerNick Mathewson <nickm@torproject.org>
Fri, 28 Dec 2007 00:34:05 +0000 (00:34 +0000)
svn:r619

test/regress_http.c

index 05c7da0defb4f30940152da221f7869adcfba4d2..4f3b955add2f46cb3872ab9773b9f0f92a5a209d 100644 (file)
@@ -122,6 +122,7 @@ http_connect(const char *address, u_short port)
                event_warn("gethostbyname");
        }
        memcpy(&sin.sin_addr, &he->h_addr, sizeof(struct in_addr));
+       sin.sin_family = AF_INET;
        sin.sin_port = htons(port);
        slen = sizeof(struct sockaddr_in);
        sa = (struct sockaddr*)&sin;
@@ -142,6 +143,7 @@ http_connect(const char *address, u_short port)
        if (fd == -1)
                event_err(1, "socket failed");
 
+       evutil_make_socket_nonblocking(fd);
        if (connect(fd, sa, slen) == -1)
                event_err(1, "connect failed");