aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2010-05-07 23:24:47 +0200
committerDaniel Stenberg <daniel@haxx.se>2010-05-07 23:24:47 +0200
commit8914857092f1c7ceb3342b9c4f5e03587e634f5d (patch)
treeb69fd139b871ff90b58d8dd245a2936242730b6a /lib
parentaca0fff4e14f9caa59fe67136db768a2507a7a62 (diff)
verboseconnect: so the verbose checking within the function
As the function is used more than once and libcurl can be built without it, do the conditional check within the verboseconnect() function itself.
Diffstat (limited to 'lib')
-rw-r--r--lib/url.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/url.c b/lib/url.c
index 0f5ac2d14..9c9e09fbc 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -154,7 +154,6 @@ static void signalPipeClose(struct curl_llist *pipeline, bool pipe_broke);
#define verboseconnect(x) do { } while (0)
#endif
-
/*
* Protocol table.
*/
@@ -3181,9 +3180,10 @@ static CURLcode ConnectPlease(struct SessionHandle *data,
#ifndef CURL_DISABLE_VERBOSE_STRINGS
static void verboseconnect(struct connectdata *conn)
{
- infof(conn->data, "Connected to %s (%s) port %ld (#%ld)\n",
- conn->bits.proxy ? conn->proxy.dispname : conn->host.dispname,
- conn->ip_addr_str, conn->port, conn->connectindex);
+ if(conn->data->set.verbose)
+ infof(conn->data, "Connected to %s (%s) port %ld (#%ld)\n",
+ conn->bits.proxy ? conn->proxy.dispname : conn->host.dispname,
+ conn->ip_addr_str, conn->port, conn->connectindex);
}
#endif
@@ -3275,8 +3275,7 @@ CURLcode Curl_protocol_connect(struct connectdata *conn,
Curl_pgrsTime(data, TIMER_CONNECT); /* connect done */
- if(data->set.verbose)
- verboseconnect(conn);
+ verboseconnect(conn);
}
if(!conn->bits.protoconnstart) {
@@ -4998,8 +4997,7 @@ static CURLcode setup_conn(struct connectdata *conn,
Curl_pgrsTime(data, TIMER_APPCONNECT); /* we're connected already */
conn->bits.tcpconnect = TRUE;
*protocol_done = TRUE;
- if(data->set.verbose)
- verboseconnect(conn);
+ verboseconnect(conn);
}
/* Stop the loop now */
break;