tests/ecore_con: clarify pointer usage in ecore_con_url tests
Summary: this was pretty bizarre CID 1401029 Reviewers: cedric Reviewed By: cedric Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10450
This commit is contained in:
parent
8d0561ac9c
commit
ccf0106448
|
@ -39,7 +39,8 @@ _url_compl_cb(void *data, int type EINA_UNUSED, void *event_info)
|
||||||
printf("Total downloaded bytes = %d\n",
|
printf("Total downloaded bytes = %d\n",
|
||||||
ecore_con_url_received_bytes_get(ev->url_con));
|
ecore_con_url_received_bytes_get(ev->url_con));
|
||||||
|
|
||||||
if (info && info->_tmpfd)
|
if (!info) return ECORE_CALLBACK_CANCEL;
|
||||||
|
if (info->_tmpfd)
|
||||||
{
|
{
|
||||||
status = ecore_con_url_status_code_get(ev->url_con);
|
status = ecore_con_url_status_code_get(ev->url_con);
|
||||||
fail_if(status != 220);
|
fail_if(status != 220);
|
||||||
|
@ -167,7 +168,6 @@ error_user:
|
||||||
EFL_START_TEST(ecore_con_test_ecore_con_url_ftp_upload)
|
EFL_START_TEST(ecore_con_test_ecore_con_url_ftp_upload)
|
||||||
{
|
{
|
||||||
Ecore_Con_Url *ec_url;
|
Ecore_Con_Url *ec_url;
|
||||||
url_test *info = NULL;
|
|
||||||
int ret;
|
int ret;
|
||||||
char link[] = ECORE_CON_FTP_TEST_URL;
|
char link[] = ECORE_CON_FTP_TEST_URL;
|
||||||
char url[4096], *username, *password, *file = NULL, *dir = NULL;
|
char url[4096], *username, *password, *file = NULL, *dir = NULL;
|
||||||
|
@ -190,7 +190,7 @@ EFL_START_TEST(ecore_con_test_ecore_con_url_ftp_upload)
|
||||||
fail_unless(ecore_con_url_ftp_upload(ec_url, file, username, password, dir));
|
fail_unless(ecore_con_url_ftp_upload(ec_url, file, username, password, dir));
|
||||||
|
|
||||||
ecore_event_handler_add(ECORE_CON_EVENT_URL_COMPLETE,
|
ecore_event_handler_add(ECORE_CON_EVENT_URL_COMPLETE,
|
||||||
_url_compl_cb, info);
|
_url_compl_cb, NULL);
|
||||||
|
|
||||||
ret = ecore_con_url_shutdown();
|
ret = ecore_con_url_shutdown();
|
||||||
fail_if(ret != 0);
|
fail_if(ret != 0);
|
||||||
|
@ -202,7 +202,6 @@ EFL_END_TEST
|
||||||
EFL_START_TEST(ecore_con_test_ecore_con_url_post)
|
EFL_START_TEST(ecore_con_test_ecore_con_url_post)
|
||||||
{
|
{
|
||||||
Ecore_Con_Url *ec_url;
|
Ecore_Con_Url *ec_url;
|
||||||
url_test *info = NULL;
|
|
||||||
int ret;
|
int ret;
|
||||||
char link[] = ECORE_CON_HTTP_TEST_URL;
|
char link[] = ECORE_CON_HTTP_TEST_URL;
|
||||||
char url_data[] = "test";
|
char url_data[] = "test";
|
||||||
|
@ -231,7 +230,7 @@ EFL_START_TEST(ecore_con_test_ecore_con_url_post)
|
||||||
fail_unless(ecore_con_url_post(ec_url, url_data, 4, NULL));
|
fail_unless(ecore_con_url_post(ec_url, url_data, 4, NULL));
|
||||||
|
|
||||||
ecore_event_handler_add(ECORE_CON_EVENT_URL_COMPLETE,
|
ecore_event_handler_add(ECORE_CON_EVENT_URL_COMPLETE,
|
||||||
_url_compl_cb, info);
|
_url_compl_cb, NULL);
|
||||||
|
|
||||||
ret = ecore_con_url_shutdown();
|
ret = ecore_con_url_shutdown();
|
||||||
fail_if(ret != 0);
|
fail_if(ret != 0);
|
||||||
|
|
Loading…
Reference in New Issue