1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

Handle new type CURLINFO_SLIST.

Handle new info list CURLINFO_SSL_ENGINES.
This commit is contained in:
Gisle Vanem 2004-12-13 16:37:27 +00:00
parent 4cf14e9f85
commit be9ea07e87

View File

@ -33,6 +33,7 @@
#include <stdarg.h>
#include <stdlib.h>
#include "memory.h"
#include "ssluse.h"
/* Make this the last #include */
#include "memdebug.h"
@ -73,6 +74,7 @@ CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...)
long *param_longp=NULL;
double *param_doublep=NULL;
char **param_charp=NULL;
struct curl_slist **param_slistp=NULL;
va_start(arg, info);
switch(info&CURLINFO_TYPEMASK) {
@ -93,6 +95,11 @@ CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...)
if(NULL == param_doublep)
return CURLE_BAD_FUNCTION_ARGUMENT;
break;
case CURLINFO_SLIST:
param_slistp = va_arg(arg, struct curl_slist **);
if(NULL == param_slistp)
return CURLE_BAD_FUNCTION_ARGUMENT;
break;
}
switch(info) {
@ -174,6 +181,10 @@ CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...)
case CURLINFO_NUM_CONNECTS:
*param_longp = data->info.numconnects;
break;
case CURLINFO_SSL_ENGINES:
Curl_SSL_engines_list(data);
*param_slistp = data->engine_list;
break;
default:
return CURLE_BAD_FUNCTION_ARGUMENT;
}