Skip to content
Snippets Groups Projects
Commit a6d666e1 authored by Dan Fandrich's avatar Dan Fandrich
Browse files

tests: Use CURLOPT_READDATA instead of the obsolete CURLOPT_INFILE

parent 455bfedc
No related branches found
No related tags found
No related merge requests found
......@@ -126,7 +126,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_POSTQUOTE, headerlist);
/* now specify which file to upload */
test_setopt(curl, CURLOPT_INFILE, hd_src);
test_setopt(curl, CURLOPT_READDATA, hd_src);
/* and give the size of the upload (optional) */
test_setopt(curl, CURLOPT_INFILESIZE_LARGE,
......
......@@ -86,7 +86,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
/* pointer to pass to our read function */
test_setopt(curl, CURLOPT_INFILE, &pooh);
test_setopt(curl, CURLOPT_READDATA, &pooh);
/* get verbose debug output please */
test_setopt(curl, CURLOPT_VERBOSE, 1L);
......
......@@ -97,7 +97,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
/* pointer to pass to our read function */
test_setopt(curl, CURLOPT_INFILE, &pooh);
test_setopt(curl, CURLOPT_READDATA, &pooh);
/* get verbose debug output please */
test_setopt(curl, CURLOPT_VERBOSE, 1L);
......
......@@ -61,7 +61,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
/* pointer to pass to our read function */
test_setopt(curl, CURLOPT_INFILE, NULL);
test_setopt(curl, CURLOPT_READDATA, NULL);
/* get verbose debug output please */
test_setopt(curl, CURLOPT_VERBOSE, 1L);
......
......@@ -96,7 +96,7 @@ int test(char *URL)
test_setopt(curl,CURLOPT_URL, URL);
/* now specify which file to upload */
test_setopt(curl, CURLOPT_INFILE, hd_src);
test_setopt(curl, CURLOPT_READDATA, hd_src);
/* Now run off and do what you've been told! */
res = curl_easy_perform(curl);
......
......@@ -126,7 +126,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
/* pointer to pass to our read function */
test_setopt(curl, CURLOPT_INFILE, &pooh);
test_setopt(curl, CURLOPT_READDATA, &pooh);
/* get verbose debug output please */
test_setopt(curl, CURLOPT_VERBOSE, 1L);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment