]> granicus.if.org Git - curl/commitdiff
only output one line about the nodelay even if it fails
authorDaniel Stenberg <daniel@haxx.se>
Thu, 25 Mar 2004 14:01:01 +0000 (14:01 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 25 Mar 2004 14:01:01 +0000 (14:01 +0000)
lib/connect.c

index eb003c28fc385e1313cb9541710986c960ece601..7ac47bff270780ebd2c8b7e12cf1eeb4d2c6606b 100644 (file)
@@ -484,10 +484,11 @@ static void Curl_setNoDelay(struct connectdata *conn,
 #ifdef TCP_NODELAY
   struct SessionHandle *data= conn->data;
   socklen_t onoff = (socklen_t) data->tcp_nodelay;
-  infof(data,"Setting TCP_NODELAY for IPv%d\n", ip);
   if(setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, &onoff, sizeof(onoff)) < 0)
     infof(data, "Could not set TCP_NODELAY: %s\n",
           Curl_strerror(conn, Curl_ourerrno()));
+  else
+    infof(data,"TCP_NODELAY set for IPv%d\n", ip);
 #else
   (void)conn;
   (void)sockfd;