projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a39789c
)
Added curl_global_* functions.
author
Guenter Knauf
<lists@gknw.net>
Thu, 12 Jul 2012 13:01:18 +0000
(15:01 +0200)
committer
Guenter Knauf
<lists@gknw.net>
Thu, 12 Jul 2012 13:01:18 +0000
(15:01 +0200)
docs/examples/post-callback.c
patch
|
blob
|
history
diff --git
a/docs/examples/post-callback.c
b/docs/examples/post-callback.c
index
9736d88
..
fa0c4b6
100644
(file)
--- a/
docs/examples/post-callback.c
+++ b/
docs/examples/post-callback.c
@@
-60,6
+60,10
@@
int main(void)
pooh.readptr = data;
pooh.sizeleft = strlen(data);
+ /* In windows, this will init the winsock stuff */
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
+ /* get a curl handle */
curl = curl_easy_init();
if(curl) {
/* First set the URL that is about to receive our POST. */
@@
-128,5
+132,6
@@
int main(void)
/* always cleanup */
curl_easy_cleanup(curl);
}
+ curl_global_cleanup();
return 0;
}