From 9f5109f7c91d5b7ad334abcd2ba3dddcc7dcf0e5 Mon Sep 17 00:00:00 2001
From: Fabian Keil <fk@fabiankeil.de>
Date: Sun, 18 Nov 2012 22:42:04 +0100
Subject: [PATCH] Get test 2032 working when using valgrind

If curl_multi_fdset() sets maxfd to -1, the socket detection
loop is skipped and thus !found_new_socket is no cause for alarm.
---
 tests/libtest/libntlmconnect.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/libtest/libntlmconnect.c b/tests/libtest/libntlmconnect.c
index 93ae06f..f596f7e 100644
--- a/tests/libtest/libntlmconnect.c
+++ b/tests/libtest/libntlmconnect.c
@@ -207,7 +207,7 @@ int test(char *url)
     }
 
     if (state == NeedSocketForNewHandle) {
-      if (!found_new_socket) {
+      if (maxfd != -1 && !found_new_socket) {
         fprintf(stderr, "Warning: socket did not open immediately for new "
                 "handle (trying again)\n");
         continue;
-- 
1.8.0


