diff options
Diffstat (limited to 'libs/libcurl/src/getinfo.c')
-rw-r--r-- | libs/libcurl/src/getinfo.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/libs/libcurl/src/getinfo.c b/libs/libcurl/src/getinfo.c index 0d72f1bdf2..e7162b3a9f 100644 --- a/libs/libcurl/src/getinfo.c +++ b/libs/libcurl/src/getinfo.c @@ -76,10 +76,10 @@ CURLcode Curl_initinfo(struct Curl_easy *data) free(info->wouldredirect);
info->wouldredirect = NULL;
- info->conn_primary_ip[0] = '\0';
- info->conn_local_ip[0] = '\0';
- info->conn_primary_port = 0;
- info->conn_local_port = 0;
+ info->primary.remote_ip[0] = '\0';
+ info->primary.local_ip[0] = '\0';
+ info->primary.remote_port = 0;
+ info->primary.local_port = 0;
info->retry_after = 0;
info->conn_scheme = 0;
@@ -153,12 +153,12 @@ static CURLcode getinfo_char(struct Curl_easy *data, CURLINFO info, break;
case CURLINFO_PRIMARY_IP:
/* Return the ip address of the most recent (primary) connection */
- *param_charp = data->info.conn_primary_ip;
+ *param_charp = data->info.primary.remote_ip;
break;
case CURLINFO_LOCAL_IP:
/* Return the source/local ip address of the most recent (primary)
connection */
- *param_charp = data->info.conn_local_ip;
+ *param_charp = data->info.primary.local_ip;
break;
case CURLINFO_RTSP_SESSION_ID:
*param_charp = data->set.str[STRING_RTSP_SESSION_ID];
@@ -180,7 +180,6 @@ static CURLcode getinfo_char(struct Curl_easy *data, CURLINFO info, *param_charp = NULL;
#endif
break;
-
default:
return CURLE_UNKNOWN_OPTION;
}
@@ -285,11 +284,11 @@ static CURLcode getinfo_long(struct Curl_easy *data, CURLINFO info, break;
case CURLINFO_PRIMARY_PORT:
/* Return the (remote) port of the most recent (primary) connection */
- *param_longp = data->info.conn_primary_port;
+ *param_longp = data->info.primary.remote_port;
break;
case CURLINFO_LOCAL_PORT:
/* Return the local port of the most recent (primary) connection */
- *param_longp = data->info.conn_local_port;
+ *param_longp = data->info.primary.local_port;
break;
case CURLINFO_PROXY_ERROR:
*param_longp = (long)data->info.pxcode;
@@ -334,6 +333,15 @@ static CURLcode getinfo_long(struct Curl_easy *data, CURLINFO info, case CURLINFO_PROTOCOL:
*param_longp = data->info.conn_protocol;
break;
+ case CURLINFO_USED_PROXY:
+ *param_longp =
+#ifdef CURL_DISABLE_PROXY
+ 0
+#else
+ data->info.used_proxy
+#endif
+ ;
+ break;
default:
return CURLE_UNKNOWN_OPTION;
}
|