From 0879515d4cd8de0c901e626f0fe7cbf597c4edb6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 15 Aug 2001 06:52:15 +0000 Subject: [PATCH] Added Curl_initinfo() that's supposed to init session-specific getinfo- variables --- lib/getinfo.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/lib/getinfo.c b/lib/getinfo.c index 7bacac849..c3c110330 100644 --- a/lib/getinfo.c +++ b/lib/getinfo.c @@ -31,13 +31,31 @@ #include #include -CURLcode Curl_getinfo(CURL *curl, CURLINFO info, ...) +/* + * This is supposed to be called in the beginning of a permform() session + * and should reset all session-info variables + */ +CURLcode Curl_initinfo(struct UrlData *data) +{ + struct Progress *pro = &data->progress; + + pro->t_nslookup = 0; + pro->t_connect = 0; + pro->t_pretransfer = 0; + + pro->httpcode = 0; + pro->httpversion=0; + pro->filetime=0; + + return CURLE_OK; +} + +CURLcode Curl_getinfo(struct UrlData *data, CURLINFO info, ...) { va_list arg; long *param_longp; double *param_doublep; char **param_charp; - struct UrlData *data = (struct UrlData *)curl; va_start(arg, info); switch(info&CURLINFO_TYPEMASK) {