forked from enlightenment/efl
return 0 on failure for status_code_get, and don't call curl functions more than once
SVN revision: 69038
This commit is contained in:
parent
b24490c854
commit
0886e14ab1
|
@ -1922,7 +1922,7 @@ EAPI void ecore_con_url_timeout_set(Ecore_Con_Url *url_con, double timeout);
|
|||
*
|
||||
* This is used to, at any time, try to return the status code for a transmission.
|
||||
* @param url_con Connection object
|
||||
* @return A valid HTTP STATUS code, or -1 on failure
|
||||
* @return A valid HTTP STATUS code, or 0 on failure
|
||||
*
|
||||
* @since 1.2
|
||||
*/
|
||||
|
|
|
@ -368,11 +368,12 @@ ecore_con_url_status_code_get(Ecore_Con_Url *url_con)
|
|||
if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL))
|
||||
{
|
||||
ECORE_MAGIC_FAIL(url_con, ECORE_MAGIC_CON_URL, __func__);
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (url_con->status) return url_con->status;
|
||||
_ecore_con_url_status_get(url_con);
|
||||
return url_con->status ?: -1;
|
||||
return url_con->status;
|
||||
#else
|
||||
return -1;
|
||||
(void)url_con;
|
||||
|
|
Loading…
Reference in New Issue