summaryrefslogtreecommitdiff
path: root/src
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 /src
parent8d0561ac9c6166d05354a097e6a643062d76167c (diff)
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
Diffstat (limited to 'src')
-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 6955248..fd4b6e9 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)
39 printf("Total downloaded bytes = %d\n", 39 printf("Total downloaded bytes = %d\n",
40 ecore_con_url_received_bytes_get(ev->url_con)); 40 ecore_con_url_received_bytes_get(ev->url_con));
41 41
42 if (info && info->_tmpfd) 42 if (!info) return ECORE_CALLBACK_CANCEL;
43 if (info->_tmpfd)
43 { 44 {
44 status = ecore_con_url_status_code_get(ev->url_con); 45 status = ecore_con_url_status_code_get(ev->url_con);
45 fail_if(status != 220); 46 fail_if(status != 220);
@@ -167,7 +168,6 @@ error_user:
167EFL_START_TEST(ecore_con_test_ecore_con_url_ftp_upload) 168EFL_START_TEST(ecore_con_test_ecore_con_url_ftp_upload)
168{ 169{
169 Ecore_Con_Url *ec_url; 170 Ecore_Con_Url *ec_url;
170 url_test *info = NULL;
171 int ret; 171 int ret;
172 char link[] = ECORE_CON_FTP_TEST_URL; 172 char link[] = ECORE_CON_FTP_TEST_URL;
173 char url[4096], *username, *password, *file = NULL, *dir = NULL; 173 char url[4096], *username, *password, *file = NULL, *dir = NULL;
@@ -190,7 +190,7 @@ EFL_START_TEST(ecore_con_test_ecore_con_url_ftp_upload)
190 fail_unless(ecore_con_url_ftp_upload(ec_url, file, username, password, dir)); 190 fail_unless(ecore_con_url_ftp_upload(ec_url, file, username, password, dir));
191 191
192 ecore_event_handler_add(ECORE_CON_EVENT_URL_COMPLETE, 192 ecore_event_handler_add(ECORE_CON_EVENT_URL_COMPLETE,
193 _url_compl_cb, info); 193 _url_compl_cb, NULL);
194 194
195 ret = ecore_con_url_shutdown(); 195 ret = ecore_con_url_shutdown();
196 fail_if(ret != 0); 196 fail_if(ret != 0);
@@ -202,7 +202,6 @@ EFL_END_TEST
202EFL_START_TEST(ecore_con_test_ecore_con_url_post) 202EFL_START_TEST(ecore_con_test_ecore_con_url_post)
203{ 203{
204 Ecore_Con_Url *ec_url; 204 Ecore_Con_Url *ec_url;
205 url_test *info = NULL;
206 int ret; 205 int ret;
207 char link[] = ECORE_CON_HTTP_TEST_URL; 206 char link[] = ECORE_CON_HTTP_TEST_URL;
208 char url_data[] = "test"; 207 char url_data[] = "test";
@@ -231,7 +230,7 @@ EFL_START_TEST(ecore_con_test_ecore_con_url_post)
231 fail_unless(ecore_con_url_post(ec_url, url_data, 4, NULL)); 230 fail_unless(ecore_con_url_post(ec_url, url_data, 4, NULL));
232 231
233 ecore_event_handler_add(ECORE_CON_EVENT_URL_COMPLETE, 232 ecore_event_handler_add(ECORE_CON_EVENT_URL_COMPLETE,
234 _url_compl_cb, info); 233 _url_compl_cb, NULL);
235 234
236 ret = ecore_con_url_shutdown(); 235 ret = ecore_con_url_shutdown();
237 fail_if(ret != 0); 236 fail_if(ret != 0);