]> granicus.if.org Git - curl/commitdiff
For tracing purposes log a fake call to getaddrinfo
authorYang Tse <yangsita@gmail.com>
Mon, 27 Oct 2008 08:20:36 +0000 (08:20 +0000)
committerYang Tse <yangsita@gmail.com>
Mon, 27 Oct 2008 08:20:36 +0000 (08:20 +0000)
when allocating/building the fake Curl_addrinfo.

tests/libtest/lib558.c

index 9dabbb718a97810414ac777f05ba95e6124cc631..41f8c86783a712a4c8af72f37df79fa15417db3a 100644 (file)
@@ -51,6 +51,13 @@ static Curl_addrinfo *fake_ai(void)
   ai->ai_family = AF_INET;
   ai->ai_addrlen = ss_size;
 
+#if defined(ENABLE_IPV6) && defined(CURLDEBUG)
+  /* For tracing purposes log a fake call to getaddrinfo */
+  if(logfile)
+    fprintf(logfile, "ADDR %s:%d getaddrinfo() = %p\n",
+            __FILE__, __LINE__, (void *)ai);
+#endif
+
   return ai;
 }