summaryrefslogtreecommitdiff
path: root/src/lib/ecore_con
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-04-11 10:38:21 -0700
committerCedric BAIL <cedric@osg.samsung.com>2018-05-24 16:02:17 -0700
commitccb5642eb9c122deac271da5f8b1353f46d73160 (patch)
tree9a0a93692425677f4853a6f1b8dadd6ee430c5ec /src/lib/ecore_con
parent36f8a70041a8a16249a07d5b7131d57a8a6ea95b (diff)
Revert "efl_add_ref - fis to use efl_add properly with a parent."
This reverts commit 2fb5cc3ad09f6aaf82b5d1131ac5ed22ed848bd4. Most of this change where wrong as they didn't affect the destruction of the object. efl_add_ref allow for manual handling of the lifecycle of the object and make sure it is still alive during destructor. efl_add will not allow you to access an object after invalidate also efl.parent.get will always return NULL once the object is invalidated. Differential Revision: https://phab.enlightenment.org/D6062
Diffstat (limited to 'src/lib/ecore_con')
-rw-r--r--src/lib/ecore_con/efl_net_ip_address.c6
-rw-r--r--src/lib/ecore_con/efl_net_ssl_context.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/ecore_con/efl_net_ip_address.c b/src/lib/ecore_con/efl_net_ip_address.c
index 097d233..e2fbb68 100644
--- a/src/lib/ecore_con/efl_net_ip_address.c
+++ b/src/lib/ecore_con/efl_net_ip_address.c
@@ -311,7 +311,7 @@ _efl_net_ip_address_create(Eo *cls, void *pd EINA_UNUSED, uint16_t port, const E
311 else 311 else
312 family = AF_INET; 312 family = AF_INET;
313 313
314 return efl_add_ref(cls, NULL, 314 return efl_add_ref(cls, efl_main_loop_get(),
315 efl_net_ip_address_family_set(efl_added, family), 315 efl_net_ip_address_family_set(efl_added, family),
316 efl_net_ip_address_port_set(efl_added, port), 316 efl_net_ip_address_port_set(efl_added, port),
317 efl_net_ip_address_set(efl_added, address)); 317 efl_net_ip_address_set(efl_added, address));
@@ -325,7 +325,7 @@ _efl_net_ip_address_create_sockaddr(Eo *cls, void *pd EINA_UNUSED, const void *p
325 EINA_SAFETY_ON_NULL_RETURN_VAL(sockaddr, NULL); 325 EINA_SAFETY_ON_NULL_RETURN_VAL(sockaddr, NULL);
326 EINA_SAFETY_ON_TRUE_RETURN_VAL((sockaddr->sa_family != AF_INET) && (sockaddr->sa_family != AF_INET6), NULL); 326 EINA_SAFETY_ON_TRUE_RETURN_VAL((sockaddr->sa_family != AF_INET) && (sockaddr->sa_family != AF_INET6), NULL);
327 327
328 return efl_add_ref(cls, NULL, 328 return efl_add_ref(cls, efl_main_loop_get(),
329 efl_net_ip_address_sockaddr_set(efl_added, sockaddr)); 329 efl_net_ip_address_sockaddr_set(efl_added, sockaddr));
330} 330}
331 331
@@ -368,7 +368,7 @@ _efl_net_ip_address_parse(Eo *cls, void *pd EINA_UNUSED, const char *numeric_add
368 return NULL; 368 return NULL;
369 } 369 }
370 370
371 return efl_add_ref(cls, NULL, 371 return efl_add_ref(cls, efl_main_loop_get(),
372 efl_net_ip_address_sockaddr_set(efl_added, &ss)); 372 efl_net_ip_address_sockaddr_set(efl_added, &ss));
373} 373}
374 374
diff --git a/src/lib/ecore_con/efl_net_ssl_context.c b/src/lib/ecore_con/efl_net_ssl_context.c
index 62de44d..e1bc090 100644
--- a/src/lib/ecore_con/efl_net_ssl_context.c
+++ b/src/lib/ecore_con/efl_net_ssl_context.c
@@ -361,7 +361,7 @@ _efl_net_ssl_context_default_dialer_get(const Efl_Class *klass, void *pd EINA_UN
361{ 361{
362 if (!_efl_net_ssl_context_default_dialer) 362 if (!_efl_net_ssl_context_default_dialer)
363 { 363 {
364 _efl_net_ssl_context_default_dialer = efl_add_ref(klass, NULL, 364 _efl_net_ssl_context_default_dialer = efl_add(klass, efl_main_loop_get(),
365 efl_net_ssl_context_verify_mode_set(efl_added, EFL_NET_SSL_VERIFY_MODE_REQUIRED), 365 efl_net_ssl_context_verify_mode_set(efl_added, EFL_NET_SSL_VERIFY_MODE_REQUIRED),
366 efl_net_ssl_context_hostname_verify_set(efl_added, EINA_TRUE), 366 efl_net_ssl_context_hostname_verify_set(efl_added, EINA_TRUE),
367 efl_net_ssl_context_default_paths_load_set(efl_added, EINA_TRUE), 367 efl_net_ssl_context_default_paths_load_set(efl_added, EINA_TRUE),