summaryrefslogtreecommitdiff
path: root/src/lib/ecore_con
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-05-01 16:21:13 -0700
committerCedric BAIL <cedric@osg.samsung.com>2018-05-24 16:02:18 -0700
commit594c254183cc3459aabe251b94cc2591b2b569cd (patch)
treefe39ea74e5e902825b9e5ff8fd2331bb8e8a8e19 /src/lib/ecore_con
parente46369a5697834f29d443ae86a99eaefee76f764 (diff)
ecore_con: trigger teardown during invalidate.
Delaying teardown might result in code expecting parent to still be valid, especially call to efl_provider_find won't work anymore. Differential Revision: https://phab.enlightenment.org/D6083
Diffstat (limited to 'src/lib/ecore_con')
-rw-r--r--src/lib/ecore_con/efl_net_socket_ssl.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/lib/ecore_con/efl_net_socket_ssl.c b/src/lib/ecore_con/efl_net_socket_ssl.c
index b91f664..3f9e6ce 100644
--- a/src/lib/ecore_con/efl_net_socket_ssl.c
+++ b/src/lib/ecore_con/efl_net_socket_ssl.c
@@ -244,7 +244,6 @@ efl_net_socket_ssl_sock_connected(void *data, const Efl_Event *event EINA_UNUSED
244 { 244 {
245 WRN("SSL=%p failed handshake: %s", o, eina_error_msg_get(err)); 245 WRN("SSL=%p failed handshake: %s", o, eina_error_msg_get(err));
246 efl_io_closer_close(o); 246 efl_io_closer_close(o);
247 return;
248 } 247 }
249 248
250 efl_unref(o); 249 efl_unref(o);
@@ -455,14 +454,6 @@ _efl_net_socket_ssl_efl_object_invalidate(Eo *o, Efl_Net_Socket_Ssl_Data *pd EIN
455 efl_event_thaw(o); 454 efl_event_thaw(o);
456 } 455 }
457 456
458 efl_invalidate(efl_super(o, MY_CLASS));
459}
460
461EOLIAN static void
462_efl_net_socket_ssl_efl_object_destructor(Eo *o, Efl_Net_Socket_Ssl_Data *pd)
463{
464 efl_destructor(efl_super(o, MY_CLASS));
465
466 pd->torndown = EINA_TRUE; 457 pd->torndown = EINA_TRUE;
467 efl_net_ssl_conn_teardown(&pd->ssl_conn); 458 efl_net_ssl_conn_teardown(&pd->ssl_conn);
468 if (pd->sock) 459 if (pd->sock)
@@ -481,7 +472,15 @@ _efl_net_socket_ssl_efl_object_destructor(Eo *o, Efl_Net_Socket_Ssl_Data *pd)
481 pd->context = NULL; 472 pd->context = NULL;
482 } 473 }
483 474
475 efl_invalidate(efl_super(o, MY_CLASS));
476}
477
478EOLIAN static void
479_efl_net_socket_ssl_efl_object_destructor(Eo *o, Efl_Net_Socket_Ssl_Data *pd)
480{
484 eina_stringshare_replace(&pd->hostname_override, NULL); 481 eina_stringshare_replace(&pd->hostname_override, NULL);
482
483 efl_destructor(efl_super(o, MY_CLASS));
485} 484}
486 485
487EOLIAN static Eina_Error 486EOLIAN static Eina_Error