]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
this seems to work more often than the present solutions
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 5 Jan 2012 21:48:01 +0000 (15:48 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 5 Jan 2012 21:48:01 +0000 (15:48 -0600)
src/include/switch_curl.h
src/mod/applications/mod_httapi/mod_httapi.c
src/switch_curl.c

index b7e578648af93589fce0a89e67082e7c14acfd15..17c4bd6ce1c88b305c78014b03ce71ff06830a72 100644 (file)
@@ -49,7 +49,7 @@ SWITCH_DECLARE(switch_CURLcode) switch_curl_easy_setopt(CURL *handle, switch_CUR
 SWITCH_DECLARE(const char *) switch_curl_easy_strerror(switch_CURLcode errornum );
 SWITCH_DECLARE(void) switch_curl_init(void);
 SWITCH_DECLARE(void) switch_curl_destroy(void);
-SWITCH_DECLARE(CURLFORMcode) switch_curl_formadd(struct curl_httppost **formpost, struct curl_httppost **lastptr, ...);
+
                                                                                                                                
 #endif
 
index 989eb298328890a3bcf2218cbaa2862596ed8733..3d45a2f3908564d033067b5793f747bf1f77b1df 100644 (file)
@@ -1134,7 +1134,7 @@ static switch_status_t process_form_post_params(client_t *client, switch_CURL *c
                        if (fname && pname) {
                                *fname++ = '\0';
 
-                               switch_curl_formadd(&formpost,
+                               curl_formadd(&formpost,
                                                         &lastptr,
                                                         CURLFORM_COPYNAME, pname,
                                                         CURLFORM_FILENAME, fname,
@@ -1143,7 +1143,7 @@ static switch_status_t process_form_post_params(client_t *client, switch_CURL *c
                        }
 
                } else {
-                       switch_curl_formadd(&formpost,
+                       curl_formadd(&formpost,
                                                 &lastptr,
                                                 CURLFORM_COPYNAME, hp->name,
                                                 CURLFORM_COPYCONTENTS, hp->value,
index 0eea13ec8619cbd3194c9c3d9f129083efe632f6..5f22b94df0d0eeb32462607946da21ebc8d55de5 100644 (file)
@@ -73,24 +73,3 @@ SWITCH_DECLARE(void) switch_curl_destroy(void)
        curl_global_cleanup();
 }
 
-/* kind of ugly but there is no better portable way to wrap this function =(::: */
-#ifndef WIN32
-#include "../../../../libs/curl/lib/formdata.c"
-#endif
-
-SWITCH_DECLARE(CURLFORMcode) switch_curl_formadd(struct curl_httppost **httppost,
-                                                                struct curl_httppost **last_post,
-                                                                ...)
-{
-  va_list arg;
-  CURLFORMcode result;
-  va_start(arg, last_post);
-#ifndef WIN32
-  result = FormAdd(httppost, last_post, arg);
-#else
-  result = curl_formadd(httppost, last_post, arg);
-#endif
-  va_end(arg);
-  return result;
-}
-