From b7eeb6e67fca686f840eacd6b8394edb58b07482 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 7 Sep 2006 21:49:20 +0000 Subject: Major overhaul introducing http pipelining support and shared connection cache within the multi handle. --- lib/getinfo.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/getinfo.c') diff --git a/lib/getinfo.c b/lib/getinfo.c index 3179ad4aa..62cedfc05 100644 --- a/lib/getinfo.c +++ b/lib/getinfo.c @@ -199,22 +199,22 @@ CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...) break; case CURLINFO_LASTSOCKET: if((data->state.lastconnect != -1) && - (data->state.connects[data->state.lastconnect] != NULL)) { - *param_longp = data->state.connects[data->state.lastconnect]-> - sock[FIRSTSOCKET]; + (data->state.connc->connects[data->state.lastconnect] != NULL)) { + struct connectdata *c = data->state.connc->connects + [data->state.lastconnect]; + *param_longp = c->sock[FIRSTSOCKET]; /* we have a socket connected, let's determine if the server shut down */ /* determine if ssl */ - if(data->state.connects[data->state.lastconnect]->ssl[FIRSTSOCKET].use) { + if(c->ssl[FIRSTSOCKET].use) { /* use the SSL context */ - if (!Curl_ssl_check_cxn(data->state.connects[data->state.lastconnect])) + if (!Curl_ssl_check_cxn(c)) *param_longp = -1; /* FIN received */ } /* Minix 3.1 doesn't support any flags on recv; just assume socket is OK */ #ifdef MSG_PEEK else { /* use the socket */ - if(recv((int)data->state.connects[data->state.lastconnect]-> - sock[FIRSTSOCKET], (void*)&buf, 1, MSG_PEEK) == 0) + if(recv((int)c->sock[FIRSTSOCKET], (void*)&buf, 1, MSG_PEEK) == 0) *param_longp = -1; /* FIN received */ } #endif -- cgit v1.2.3