summaryrefslogtreecommitdiff
path: root/src/lib/ecore_con/efl_net_socket_windows.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-04-17 16:17:29 -0700
committerCedric BAIL <cedric@osg.samsung.com>2018-05-01 10:39:01 -0700
commit33fd77e9e43b0fa29cb484b72d910bdf0ecccbc8 (patch)
tree0ebd1c0615445af5e1321a85b6878087b4cb54a8 /src/lib/ecore_con/efl_net_socket_windows.c
parent193149deb85004aeda452dd4d729f995f4f313f9 (diff)
ecore: move close_on_destructor to close_on_invalidate as that describe the behavior best.
Fix all use to correctly behave on invalidate.
Diffstat (limited to 'src/lib/ecore_con/efl_net_socket_windows.c')
-rw-r--r--src/lib/ecore_con/efl_net_socket_windows.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/lib/ecore_con/efl_net_socket_windows.c b/src/lib/ecore_con/efl_net_socket_windows.c
index 33e166aea1..c69d0a8b6d 100644
--- a/src/lib/ecore_con/efl_net_socket_windows.c
+++ b/src/lib/ecore_con/efl_net_socket_windows.c
@@ -47,7 +47,7 @@ typedef struct _Efl_Net_Socket_Windows_Data
47 Eina_Bool can_write; 47 Eina_Bool can_write;
48 Eina_Bool io_started; 48 Eina_Bool io_started;
49 Eina_Bool close_on_exec; 49 Eina_Bool close_on_exec;
50 Eina_Bool close_on_destructor; 50 Eina_Bool close_on_invalidate;
51} Efl_Net_Socket_Windows_Data; 51} Efl_Net_Socket_Windows_Data;
52 52
53struct _Efl_Net_Socket_Windows_Operation 53struct _Efl_Net_Socket_Windows_Operation
@@ -634,9 +634,9 @@ _efl_net_socket_windows_efl_object_constructor(Eo *o, Efl_Net_Socket_Windows_Dat
634} 634}
635 635
636EOLIAN static void 636EOLIAN static void
637_efl_net_socket_windows_efl_object_destructor(Eo *o, Efl_Net_Socket_Windows_Data *pd) 637_efl_net_socket_windows_efl_object_invalidate(Eo *o, Efl_Net_Socket_Windows_Data *pd)
638{ 638{
639 if (efl_io_closer_close_on_destructor_get(o) && 639 if (efl_io_closer_close_on_invalidate_get(o) &&
640 (!efl_io_closer_closed_get(o))) 640 (!efl_io_closer_closed_get(o)))
641 { 641 {
642 efl_event_freeze(o); 642 efl_event_freeze(o);
@@ -644,6 +644,12 @@ _efl_net_socket_windows_efl_object_destructor(Eo *o, Efl_Net_Socket_Windows_Data
644 efl_event_thaw(o); 644 efl_event_thaw(o);
645 } 645 }
646 646
647 efl_invalidate(efl_super(o, MY_CLASS));
648}
649
650EOLIAN static void
651_efl_net_socket_windows_efl_object_destructor(Eo *o, Efl_Net_Socket_Windows_Data *pd)
652{
647 efl_destructor(efl_super(o, MY_CLASS)); 653 efl_destructor(efl_super(o, MY_CLASS));
648 654
649 eina_stringshare_replace(&pd->address_local, NULL); 655 eina_stringshare_replace(&pd->address_local, NULL);
@@ -748,15 +754,15 @@ _efl_net_socket_windows_efl_io_closer_close_on_exec_get(const Eo *o EINA_UNUSED,
748} 754}
749 755
750EOLIAN static void 756EOLIAN static void
751_efl_net_socket_windows_efl_io_closer_close_on_destructor_set(Eo *o EINA_UNUSED, Efl_Net_Socket_Windows_Data *pd, Eina_Bool close_on_destructor) 757_efl_net_socket_windows_efl_io_closer_close_on_invalidate_set(Eo *o EINA_UNUSED, Efl_Net_Socket_Windows_Data *pd, Eina_Bool close_on_invalidate)
752{ 758{
753 pd->close_on_destructor = close_on_destructor; 759 pd->close_on_invalidate = close_on_invalidate;
754} 760}
755 761
756EOLIAN static Eina_Bool 762EOLIAN static Eina_Bool
757_efl_net_socket_windows_efl_io_closer_close_on_destructor_get(const Eo *o EINA_UNUSED, Efl_Net_Socket_Windows_Data *pd) 763_efl_net_socket_windows_efl_io_closer_close_on_invalidate_get(const Eo *o EINA_UNUSED, Efl_Net_Socket_Windows_Data *pd)
758{ 764{
759 return pd->close_on_destructor; 765 return pd->close_on_invalidate;
760} 766}
761 767
762EOLIAN static Eina_Error 768EOLIAN static Eina_Error