summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-10-18 13:29:57 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-10-18 13:29:57 -0400
commitccf0106448f566568c8ccd4f0ff1674433a26ad0 (patch)
tree199e5b70387f19fc0592c2de09751037288bb5e6
parent8d0561ac9c6166d05354a097e6a643062d76167c (diff)
downloadefl-ccf0106448f566568c8ccd4f0ff1674433a26ad0.tar.gz
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
-rw-r--r--src/tests/ecore_con/ecore_con_test_ecore_con_url.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/tests/ecore_con/ecore_con_test_ecore_con_url.c b/src/tests/ecore_con/ecore_con_test_ecore_con_url.c
index 69552485e9..fd4b6e9ca9 100644
--- a/src/tests/ecore_con/ecore_con_test_ecore_con_url.c
+++ b/src/tests/ecore_con/ecore_con_test_ecore_con_url.c
@@ -39,7 +39,8 @@ _url_compl_cb(void *data, int type EINA_UNUSED, void *event_info)
printf("Total downloaded bytes = %d\n",
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);
fail_if(status != 220);
@@ -167,7 +168,6 @@ error_user:
EFL_START_TEST(ecore_con_test_ecore_con_url_ftp_upload)
{
Ecore_Con_Url *ec_url;
- url_test *info = NULL;
int ret;
char link[] = ECORE_CON_FTP_TEST_URL;
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));
ecore_event_handler_add(ECORE_CON_EVENT_URL_COMPLETE,
- _url_compl_cb, info);
+ _url_compl_cb, NULL);
ret = ecore_con_url_shutdown();
fail_if(ret != 0);
@@ -202,7 +202,6 @@ EFL_END_TEST
EFL_START_TEST(ecore_con_test_ecore_con_url_post)
{
Ecore_Con_Url *ec_url;
- url_test *info = NULL;
int ret;
char link[] = ECORE_CON_HTTP_TEST_URL;
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));
ecore_event_handler_add(ECORE_CON_EVENT_URL_COMPLETE,
- _url_compl_cb, info);
+ _url_compl_cb, NULL);
ret = ecore_con_url_shutdown();
fail_if(ret != 0);