diff options
Diffstat (limited to 'Source/CTest/Curl/getinfo.c')
-rw-r--r-- | Source/CTest/Curl/getinfo.c | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/Source/CTest/Curl/getinfo.c b/Source/CTest/Curl/getinfo.c index b05e51b..6639833 100644 --- a/Source/CTest/Curl/getinfo.c +++ b/Source/CTest/Curl/getinfo.c @@ -1,25 +1,25 @@ -/***************************************************************************** +/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al. - * - * In order to be useful for every potential user, curl and libcurl are - * dual-licensed under the MPL and the MIT/X-derivate licenses. + * Copyright (C) 1998 - 2002, Daniel Stenberg, <daniel@haxx.se>, et al. * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at http://curl.haxx.se/docs/copyright.html. + * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the MPL or the MIT/X-derivate - * licenses. You may pick one of these licenses. + * furnished to do so, under the terms of the COPYING file. * * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * * $Id$ - *****************************************************************************/ + ***************************************************************************/ #include "setup.h" @@ -35,6 +35,11 @@ #include <stdlib.h> #endif +/* Make this the last #include */ +#ifdef MALLOCDEBUG +#include "memdebug.h" +#endif + /* * This is supposed to be called in the beginning of a permform() session * and should reset all session-info variables @@ -49,6 +54,7 @@ CURLcode Curl_initinfo(struct SessionHandle *data) pro->t_pretransfer = 0; pro->t_starttransfer = 0; pro->timespent = 0; + pro->t_redirect = 0; info->httpcode = 0; info->httpversion=0; @@ -66,9 +72,9 @@ CURLcode Curl_initinfo(struct SessionHandle *data) CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...) { va_list arg; - long *param_longp; - double *param_doublep; - char **param_charp; + long *param_longp=NULL; + double *param_doublep=NULL; + char **param_charp=NULL; va_start(arg, info); switch(info&CURLINFO_TYPEMASK) { @@ -143,6 +149,12 @@ CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...) case CURLINFO_CONTENT_LENGTH_UPLOAD: *param_doublep = data->progress.size_ul; break; + case CURLINFO_REDIRECT_TIME: + *param_doublep = data->progress.t_redirect; + break; + case CURLINFO_REDIRECT_COUNT: + *param_longp = data->set.followlocation; + break; case CURLINFO_CONTENT_TYPE: *param_charp = data->info.contenttype; break; |