forked from enlightenment/efl
fix printf format warnings (int vs size_t) and curl usage warning (curl_easy_getinfo tromps on a pointer to a long, not an int)
SVN revision: 40430
This commit is contained in:
parent
b980d9477e
commit
5016400f63
|
@ -455,7 +455,7 @@ ecore_con_url_send(Ecore_Con_Url *url_con, const void *data, size_t length, cons
|
||||||
sprintf(tmp, "Content-type: %s", content_type);
|
sprintf(tmp, "Content-type: %s", content_type);
|
||||||
url_con->headers = curl_slist_append(url_con->headers, tmp);
|
url_con->headers = curl_slist_append(url_con->headers, tmp);
|
||||||
}
|
}
|
||||||
sprintf(tmp, "Content-length: %d", length);
|
sprintf(tmp, "Content-length: %zu", length);
|
||||||
url_con->headers = curl_slist_append(url_con->headers, tmp);
|
url_con->headers = curl_slist_append(url_con->headers, tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -745,7 +745,7 @@ _ecore_con_url_read_cb(void *ptr, size_t size, size_t nitems, void *stream)
|
||||||
fclose((FILE*)stream);
|
fclose((FILE*)stream);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
fprintf(stderr, "*** We read %d bytes from file\n", retcode);
|
fprintf(stderr, "*** We read %zu bytes from file\n", retcode);
|
||||||
return retcode;
|
return retcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -884,9 +884,11 @@ _ecore_con_url_process_completed_jobs(Ecore_Con_Url *url_con_to_match)
|
||||||
e = calloc(1, sizeof(Ecore_Con_Event_Url_Complete));
|
e = calloc(1, sizeof(Ecore_Con_Event_Url_Complete));
|
||||||
if (e)
|
if (e)
|
||||||
{
|
{
|
||||||
|
long status; /* curl API uses long, not int */
|
||||||
e->url_con = url_con;
|
e->url_con = url_con;
|
||||||
e->status = 0;
|
e->status = 0;
|
||||||
curl_easy_getinfo(curlmsg->easy_handle, CURLINFO_RESPONSE_CODE, &e->status);
|
curl_easy_getinfo(curlmsg->easy_handle, CURLINFO_RESPONSE_CODE, &status);
|
||||||
|
e->status = status;
|
||||||
_url_complete_push_event(ECORE_CON_EVENT_URL_COMPLETE, e);
|
_url_complete_push_event(ECORE_CON_EVENT_URL_COMPLETE, e);
|
||||||
}
|
}
|
||||||
curl_multi_remove_handle(curlm, url_con->curl_easy);
|
curl_multi_remove_handle(curlm, url_con->curl_easy);
|
||||||
|
|
Loading…
Reference in New Issue