Make this code use the proper pointers
This commit is contained in:
parent
06a7b0561b
commit
80a0b81c2a
@ -24,12 +24,13 @@ int main(int argc, char *argv[])
|
|||||||
CURLM *multi_handle;
|
CURLM *multi_handle;
|
||||||
int still_running;
|
int still_running;
|
||||||
|
|
||||||
struct HttpPost *formpost=NULL;
|
struct curl_httppost *formpost=NULL;
|
||||||
struct HttpPost *lastptr=NULL;
|
struct curl_httppost *lastptr=NULL;
|
||||||
struct curl_slist *headerlist=NULL;
|
struct curl_slist *headerlist=NULL;
|
||||||
char buf[] = "Expect:";
|
char buf[] = "Expect:";
|
||||||
|
|
||||||
/* Fill in the file upload field */
|
/* Fill in the file upload field. This makes libcurl load data from
|
||||||
|
the given file name when curl_easy_perform() is called. */
|
||||||
curl_formadd(&formpost,
|
curl_formadd(&formpost,
|
||||||
&lastptr,
|
&lastptr,
|
||||||
CURLFORM_COPYNAME, "sendfile",
|
CURLFORM_COPYNAME, "sendfile",
|
||||||
@ -43,7 +44,6 @@ int main(int argc, char *argv[])
|
|||||||
CURLFORM_COPYCONTENTS, "postit2.c",
|
CURLFORM_COPYCONTENTS, "postit2.c",
|
||||||
CURLFORM_END);
|
CURLFORM_END);
|
||||||
|
|
||||||
|
|
||||||
/* Fill in the submit field too, even if this is rarely needed */
|
/* Fill in the submit field too, even if this is rarely needed */
|
||||||
curl_formadd(&formpost,
|
curl_formadd(&formpost,
|
||||||
&lastptr,
|
&lastptr,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user