Merge remote-tracking branch 'origin/upstream'
[framework/uifw/ecore.git] / src / lib / ecore_con / ecore_con_url.c
index c2d8242..6e54674 100644 (file)
@@ -358,6 +358,7 @@ ecore_con_url_free(Ecore_Con_Url *url_con)
         // this prevent any further call to the callback.
         curl_easy_setopt(url_con->curl_easy, CURLOPT_NOPROGRESS, EINA_TRUE);
         curl_easy_setopt(url_con->curl_easy, CURLOPT_PROGRESSFUNCTION, NULL);
+        curl_easy_setopt(url_con->curl_easy, CURLOPT_NOPROGRESS, EINA_TRUE);
 
         if (url_con->active)
           {
@@ -693,6 +694,10 @@ _ecore_con_url_send(Ecore_Con_Url *url_con,
              curl_easy_setopt(url_con->curl_easy, CURLOPT_POSTFIELDS, data);
              curl_easy_setopt(url_con->curl_easy, CURLOPT_POSTFIELDSIZE, length);
           }
+        else if (mode == MODE_POST)
+          {
+             curl_easy_setopt(url_con->curl_easy, CURLOPT_POST, 1);
+          }
      }
 
    switch (url_con->time_condition)
@@ -1360,21 +1365,14 @@ _ecore_con_url_perform(Ecore_Con_Url *url_con)
    int fd_max, fd;
    int flags, still_running;
    int completed_immediately = 0;
-   double start;
    CURLMcode ret;
 
    _url_con_list = eina_list_append(_url_con_list, url_con);
 
    url_con->active = EINA_TRUE;
    curl_multi_add_handle(_curlm, url_con->curl_easy);
-
-   start = ecore_time_get();
-   while (curl_multi_perform(_curlm, &still_running) == CURLM_CALL_MULTI_PERFORM)
-     if ((ecore_time_get() - start) > (0.7 * ecore_animator_frametime_get()))
-       {
-          break;
-       }
-
+   curl_multi_perform(_curlm, &still_running);
+   
    completed_immediately = _ecore_con_url_process_completed_jobs(url_con);
 
    if (!completed_immediately)
@@ -1459,17 +1457,9 @@ _ecore_con_url_perform(Ecore_Con_Url *url_con)
 static Eina_Bool
 _ecore_con_url_idler_handler(void *data)
 {
-   double start;
-   int done = 1, still_running;
-
-   start = ecore_time_get();
-   while (curl_multi_perform(_curlm, &still_running) == CURLM_CALL_MULTI_PERFORM)
-     /* make this not more than a frametime to keep interactivity high */
-     if ((ecore_time_get() - start) > (0.7 * ecore_animator_frametime_get()))
-       {
-          done = 0;
-          break;
-       }
+   int done, still_running;
+
+   done = (curl_multi_perform(_curlm, &still_running) != CURLM_CALL_MULTI_PERFORM);
 
    _ecore_con_url_process_completed_jobs(NULL);