aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorCarlo Wood <carlo@alinoe.com>2014-11-18 23:02:40 +0100
committerDaniel Stenberg <daniel@haxx.se>2014-11-18 23:02:40 +0100
commit013d5c18c3078fe737c5f20382cbdc834cfff3dc (patch)
treec383fa6d0e3189a252e2f0b14b679b80f51f2cc5 /lib
parentb77ff4d589785861b0a91bef6b6fc2a261374f1c (diff)
debug: added new connection cache output, plus fixups
Debug output 'typo' fix. Don't print an extra "0x" in * Pipe broke: handle 0x0x2546d88, url = / Add debug output. Print the number of connections in the connection cache when adding one, and not only when one is removed. Fix typos in comments.
Diffstat (limited to 'lib')
-rw-r--r--lib/conncache.c4
-rw-r--r--lib/connect.c2
-rw-r--r--lib/multi.c4
3 files changed, 7 insertions, 3 deletions
diff --git a/lib/conncache.c b/lib/conncache.c
index 9522aeb10..d07718e83 100644
--- a/lib/conncache.c
+++ b/lib/conncache.c
@@ -152,6 +152,10 @@ CURLcode Curl_conncache_add_conn(struct conncache *connc,
conn->connection_id = connc->next_connection_id++;
connc->num_connections++;
+ DEBUGF(infof(conn->data, "Added connection %d. "
+ "The cache now contains %d members\n",
+ conn->connection_id, connc->num_connections));
+
return CURLE_OK;
}
diff --git a/lib/connect.c b/lib/connect.c
index 3a1bc2df7..5f64afab3 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -1326,7 +1326,7 @@ CURLcode Curl_socket(struct connectdata *conn,
#ifdef CURLDEBUG
/*
* Curl_conncontrol() is used to set the conn->bits.close bit on or off. It
- * MUST be called with the connclose() or connclose() macros with a stated
+ * MUST be called with the connclose() or connkeep() macros with a stated
* reason. The reason is only shown in debug builds but helps to figure out
* decision paths when connections are or aren't re-used as expected.
*/
diff --git a/lib/multi.c b/lib/multi.c
index 080e54bce..6313ba4ae 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -524,7 +524,7 @@ CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
connection. */
connclose(data->easy_conn, "Removed with partial response");
/* Set connection owner so that Curl_done() closes it.
- We can sefely do this here since connection is killed. */
+ We can safely do this here since connection is killed. */
data->easy_conn->data = easy;
easy_owns_conn = TRUE;
}
@@ -944,7 +944,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
/* Handle the case when the pipe breaks, i.e., the connection
we're using gets cleaned up and we're left with nothing. */
if(data->state.pipe_broke) {
- infof(data, "Pipe broke: handle 0x%p, url = %s\n",
+ infof(data, "Pipe broke: handle %p, url = %s\n",
(void *)data, data->state.path);
if(data->mstate < CURLM_STATE_COMPLETED) {