Hi
some time ago i submitted a patch to get infos about the last connection
done by a curl handle.
http://curl.haxx.se/mail/lib-2010-05/0333.html
few days the function Curl_updateconninfo() was changed as I understood
from http://curl.haxx.se/mail/lib-2010-06/0035.html.
since git commit feecf63a9607cce4c9339ad9f1b5a550e6bd2d98 (see below)
the whole function is skipped if the connection is being reused.
+ if(conn->bits.reuse)
+ /* reusing same connection */
+ return;
+
the problem now is if a connection is being reused the information is
not stored in the curlhandle, so the info is not available for
CURLINFO_LOCAL* calls.
I propose just to revert the commit above. (patch attached)
cheers Frank
diff --git a/lib/connect.c b/lib/connect.c
index 88fb7eb..563453c 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -579,10 +579,6 @@ void Curl_updateconninfo(struct connectdata *conn,
curl_socket_t sockfd)
struct SessionHandle *data = conn->data;
struct PureInfo *info = &conn->data->info;
- if(conn->bits.reuse)
- /* reusing same connection */
- return;
-
len = sizeof(struct Curl_sockaddr_storage);
if(getpeername(sockfd, (struct sockaddr*) &ssrem, &len)) {
error = SOCKERRNO;
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html