changed the test() function to return type int
This commit is contained in:
Родитель
a271cfb697
Коммит
a5c4442ebf
|
@ -6,7 +6,7 @@ extern void curl_memdebug(const char *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* test is provided in the test code file */
|
/* test is provided in the test code file */
|
||||||
CURLcode test(char *url);
|
int test(char *url);
|
||||||
|
|
||||||
char *arg2=NULL;
|
char *arg2=NULL;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
CURLcode test(char *URL)
|
int test(char *URL)
|
||||||
{
|
{
|
||||||
CURLcode res;
|
CURLcode res;
|
||||||
CURL *curl = curl_easy_init();
|
CURL *curl = curl_easy_init();
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* Get a single URL without select().
|
* Get a single URL without select().
|
||||||
*/
|
*/
|
||||||
|
|
||||||
CURLcode test(char *URL)
|
int test(char *URL)
|
||||||
{
|
{
|
||||||
CURL *c;
|
CURL *c;
|
||||||
CURLM *m;
|
CURLM *m;
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
* auth info.
|
* auth info.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
CURLcode test(char *URL)
|
int test(char *URL)
|
||||||
{
|
{
|
||||||
CURL *c;
|
CURL *c;
|
||||||
CURLM *m;
|
CURLM *m;
|
||||||
|
@ -82,6 +82,6 @@ CURLcode test(char *URL)
|
||||||
curl_easy_cleanup(c);
|
curl_easy_cleanup(c);
|
||||||
curl_multi_cleanup(m);
|
curl_multi_cleanup(m);
|
||||||
|
|
||||||
return 0;
|
return CURLE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
* Use multi interface to get document over proxy with bad port number.
|
* Use multi interface to get document over proxy with bad port number.
|
||||||
* This caused the interface to "hang" in libcurl 7.10.2.
|
* This caused the interface to "hang" in libcurl 7.10.2.
|
||||||
*/
|
*/
|
||||||
CURLcode test(char *URL)
|
int test(char *URL)
|
||||||
{
|
{
|
||||||
CURL *c;
|
CURL *c;
|
||||||
CURLcode ret=CURLE_OK;
|
CURLcode ret=CURLE_OK;
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
* Example based on source code provided by Erick Nuwendam. Thanks!
|
* Example based on source code provided by Erick Nuwendam. Thanks!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
CURLcode test(char *URL)
|
int test(char *URL)
|
||||||
{
|
{
|
||||||
CURL *curl;
|
CURL *curl;
|
||||||
CURLcode res;
|
CURLcode res;
|
||||||
|
|
|
@ -127,7 +127,7 @@ char *suburl(char *base, int i)
|
||||||
|
|
||||||
|
|
||||||
/* test function */
|
/* test function */
|
||||||
CURLcode test(char *URL)
|
int test(char *URL)
|
||||||
{
|
{
|
||||||
CURLcode res;
|
CURLcode res;
|
||||||
CURLSHcode scode;
|
CURLSHcode scode;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
CURLcode test(char *URL)
|
int test(char *URL)
|
||||||
{
|
{
|
||||||
CURL* curls;
|
CURL* curls;
|
||||||
CURLM* multi;
|
CURLM* multi;
|
||||||
|
|
|
@ -24,7 +24,7 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
|
||||||
return -1; /* no more data left to deliver */
|
return -1; /* no more data left to deliver */
|
||||||
}
|
}
|
||||||
|
|
||||||
CURLcode test(char *URL)
|
int test(char *URL)
|
||||||
{
|
{
|
||||||
CURL *curl;
|
CURL *curl;
|
||||||
CURLcode res=CURLE_OK;
|
CURLcode res=CURLE_OK;
|
||||||
|
|
|
@ -159,8 +159,7 @@ static CURLcode sslctxfun(CURL * curl, void * sslctx, void * parm)
|
||||||
return CURLE_OK ;
|
return CURLE_OK ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int test(char *URL)
|
||||||
CURLcode test(char *URL)
|
|
||||||
{
|
{
|
||||||
CURLM* multi;
|
CURLM* multi;
|
||||||
sslctxparm p;
|
sslctxparm p;
|
||||||
|
|
|
@ -32,7 +32,7 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
|
||||||
return 0; /* no more data left to deliver */
|
return 0; /* no more data left to deliver */
|
||||||
}
|
}
|
||||||
|
|
||||||
CURLcode test(char *URL)
|
int test(char *URL)
|
||||||
{
|
{
|
||||||
CURL *curl;
|
CURL *curl;
|
||||||
CURLcode res=CURLE_OK;
|
CURLcode res=CURLE_OK;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче