summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-11-30 15:45:39 -0800
committerChristopher Michael <cp.michael@samsung.com>2018-12-06 12:06:17 -0500
commit2d12a6eb4c392f308d24a4cbdc9890635822a2b4 (patch)
treee52ff65ee912aae5f3a89f135bba3dc0ef8077df
parentbcc59fd98f59b075b312a5e4c70079b7609036e5 (diff)
ecore_con: properly track each handler separately and destroy each only once.
Differential Revision: https://phab.enlightenment.org/D7400
-rw-r--r--src/tests/ecore_con/ecore_con_test_ecore_con.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tests/ecore_con/ecore_con_test_ecore_con.c b/src/tests/ecore_con/ecore_con_test_ecore_con.c
index a0e532be39..ed77811f46 100644
--- a/src/tests/ecore_con/ecore_con_test_ecore_con.c
+++ b/src/tests/ecore_con/ecore_con_test_ecore_con.c
@@ -464,13 +464,14 @@ EFL_START_TEST(ecore_test_ecore_con_dns)
464{ 464{
465 Ecore_Con_Server *client; 465 Ecore_Con_Server *client;
466 Ecore_Event_Handler *e_err; 466 Ecore_Event_Handler *e_err;
467 Ecore_Event_Handler *e_del;
467 Ecore_Event_Handler *e_add; 468 Ecore_Event_Handler *e_add;
468 Eina_Bool err_check = EINA_FALSE; 469 Eina_Bool err_check = EINA_FALSE;
469 470
470 e_add = ecore_event_handler_add(ECORE_CON_EVENT_SERVER_ADD, _dns_add_del, (void *) &err_check); 471 e_add = ecore_event_handler_add(ECORE_CON_EVENT_SERVER_ADD, _dns_add_del, (void *) &err_check);
471 e_err = ecore_event_handler_add(ECORE_CON_EVENT_SERVER_ERROR, _dns_err, (void *) &err_check); 472 e_err = ecore_event_handler_add(ECORE_CON_EVENT_SERVER_ERROR, _dns_err, (void *) &err_check);
472 /* For timeout */ 473 /* For timeout */
473 e_err = ecore_event_handler_add(ECORE_CON_EVENT_SERVER_DEL, _dns_add_del, (void *) &err_check); 474 e_del = ecore_event_handler_add(ECORE_CON_EVENT_SERVER_DEL, _dns_add_del, (void *) &err_check);
474 475
475 client = ecore_con_server_connect(ECORE_CON_REMOTE_TCP, 476 client = ecore_con_server_connect(ECORE_CON_REMOTE_TCP,
476 "wongsub.wrongdns.lan", 1234, NULL); 477 "wongsub.wrongdns.lan", 1234, NULL);
@@ -480,6 +481,7 @@ EFL_START_TEST(ecore_test_ecore_con_dns)
480 ecore_main_loop_begin(); 481 ecore_main_loop_begin();
481 fail_if (err_check != EINA_FALSE); 482 fail_if (err_check != EINA_FALSE);
482 fail_if (ecore_event_handler_del(e_err) != (void *) &err_check); 483 fail_if (ecore_event_handler_del(e_err) != (void *) &err_check);
484 fail_if (ecore_event_handler_del(e_del) != (void *) &err_check);
483 fail_if (ecore_event_handler_del(e_add) != (void *) &err_check); 485 fail_if (ecore_event_handler_del(e_add) != (void *) &err_check);
484} 486}
485EFL_END_TEST 487EFL_END_TEST