-rw-r--r-- | lib/curl.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/curl.cc b/lib/curl.cc index 418aa79..3e69b47 100644 --- a/lib/curl.cc +++ b/lib/curl.cc | |||
@@ -32,11 +32,23 @@ namespace opkele { | |||
32 | #endif | 32 | #endif |
33 | #ifdefDISABLE_CURL_SSL_VERIFYPEER | 33 | #ifdefDISABLE_CURL_SSL_VERIFYPEER |
34 | || (r=easy_setopt(CURLOPT_SSL_VERIFYPEER,0)) | 34 | || (r=easy_setopt(CURLOPT_SSL_VERIFYPEER,0)) |
35 | #endif | 35 | #endif |
36 | ; | 36 | ; |
37 | return r; | 37 | return r; |
38 | } | 38 | } |
39 | 39 | ||
40 | static size_t _write(void *p,size_t s,size_t nm,void *stream) { | ||
41 | return ((curl_t*)stream)->write(p,s,nm); | ||
42 | } | ||
43 | |||
44 | CURLcode curl_t::set_write() { | ||
45 | assert(_c); | ||
46 | CURLcode r; | ||
47 | (r = easy_setopt(CURLOPT_WRITEDATA,this)) | ||
48 | || (r = easy_setopt(CURLOPT_WRITEFUNCTION,_write)); | ||
49 | return r; | ||
50 | } | ||
51 | |||
40 | } | 52 | } |
41 | 53 | ||
42 | } | 54 | } |