summaryrefslogtreecommitdiff
path: root/src/lib/ecore_con
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2016-12-19 20:31:11 -0200
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2016-12-20 10:18:32 -0200
commit08c38713ced3baef854ffe13478bf60ae2dbcd59 (patch)
treed9c222d275593fac552faef13b90172ed94b84d4 /src/lib/ecore_con
parent963e3a793dcca07a162b1f6bbbd4f1d3f889963b (diff)
do not emit events from efl_io_closer_close() on destructor.
On destructor we're not supposed to emit events, I even thought that would be implicit, but it's not. If we do, for example an event handler that would 'efl_del()' on "EFL_IO_CLOSER_EVENT_CLOSED" would trigger too-many unrefs.
Diffstat (limited to 'src/lib/ecore_con')
-rw-r--r--src/lib/ecore_con/efl_net_dialer_http.c8
-rw-r--r--src/lib/ecore_con/efl_net_dialer_ssl.c6
-rw-r--r--src/lib/ecore_con/efl_net_dialer_tcp.c6
-rw-r--r--src/lib/ecore_con/efl_net_dialer_udp.c6
-rw-r--r--src/lib/ecore_con/efl_net_dialer_unix.c6
-rw-r--r--src/lib/ecore_con/efl_net_server_udp_client.c6
-rw-r--r--src/lib/ecore_con/efl_net_socket_fd.c6
-rw-r--r--src/lib/ecore_con/efl_net_socket_ssl.c6
8 files changed, 42 insertions, 8 deletions
diff --git a/src/lib/ecore_con/efl_net_dialer_http.c b/src/lib/ecore_con/efl_net_dialer_http.c
index 135051dd65..b4d39e456e 100644
--- a/src/lib/ecore_con/efl_net_dialer_http.c
+++ b/src/lib/ecore_con/efl_net_dialer_http.c
@@ -1143,11 +1143,17 @@ _efl_net_dialer_http_efl_object_destructor(Eo *o, Efl_Net_Dialer_Http_Data *pd)
1143 else if (pd->pending_close) 1143 else if (pd->pending_close)
1144 { 1144 {
1145 efl_future_cancel(pd->pending_close); 1145 efl_future_cancel(pd->pending_close);
1146 efl_event_freeze(o);
1146 efl_io_closer_close(o); 1147 efl_io_closer_close(o);
1148 efl_event_thaw(o);
1147 } 1149 }
1148 else if (efl_io_closer_close_on_destructor_get(o) && 1150 else if (efl_io_closer_close_on_destructor_get(o) &&
1149 (!efl_io_closer_closed_get(o))) 1151 (!efl_io_closer_closed_get(o)))
1150 efl_io_closer_close(o); 1152 {
1153 efl_event_freeze(o);
1154 efl_io_closer_close(o);
1155 efl_event_thaw(o);
1156 }
1151 1157
1152 efl_net_dialer_http_response_headers_clear(o); 1158 efl_net_dialer_http_response_headers_clear(o);
1153 1159
diff --git a/src/lib/ecore_con/efl_net_dialer_ssl.c b/src/lib/ecore_con/efl_net_dialer_ssl.c
index 453486b65d..d873434756 100644
--- a/src/lib/ecore_con/efl_net_dialer_ssl.c
+++ b/src/lib/ecore_con/efl_net_dialer_ssl.c
@@ -98,7 +98,11 @@ _efl_net_dialer_ssl_efl_object_destructor(Eo *o, Efl_Net_Dialer_Ssl_Data *pd)
98{ 98{
99 if (efl_io_closer_close_on_destructor_get(o) && 99 if (efl_io_closer_close_on_destructor_get(o) &&
100 (!efl_io_closer_closed_get(o))) 100 (!efl_io_closer_closed_get(o)))
101 efl_io_closer_close(o); 101 {
102 efl_event_freeze(o);
103 efl_io_closer_close(o);
104 efl_event_thaw(o);
105 }
102 106
103 if (pd->sock) 107 if (pd->sock)
104 { 108 {
diff --git a/src/lib/ecore_con/efl_net_dialer_tcp.c b/src/lib/ecore_con/efl_net_dialer_tcp.c
index 70aa4219cd..8806cc33bb 100644
--- a/src/lib/ecore_con/efl_net_dialer_tcp.c
+++ b/src/lib/ecore_con/efl_net_dialer_tcp.c
@@ -57,7 +57,11 @@ _efl_net_dialer_tcp_efl_object_destructor(Eo *o, Efl_Net_Dialer_Tcp_Data *pd)
57{ 57{
58 if (efl_io_closer_close_on_destructor_get(o) && 58 if (efl_io_closer_close_on_destructor_get(o) &&
59 (!efl_io_closer_closed_get(o))) 59 (!efl_io_closer_closed_get(o)))
60 efl_io_closer_close(o); 60 {
61 efl_event_freeze(o);
62 efl_io_closer_close(o);
63 efl_event_thaw(o);
64 }
61 65
62 if (pd->connect.thread) 66 if (pd->connect.thread)
63 { 67 {
diff --git a/src/lib/ecore_con/efl_net_dialer_udp.c b/src/lib/ecore_con/efl_net_dialer_udp.c
index e493ec9080..c85c770a20 100644
--- a/src/lib/ecore_con/efl_net_dialer_udp.c
+++ b/src/lib/ecore_con/efl_net_dialer_udp.c
@@ -58,7 +58,11 @@ _efl_net_dialer_udp_efl_object_destructor(Eo *o, Efl_Net_Dialer_Udp_Data *pd)
58{ 58{
59 if (efl_io_closer_close_on_destructor_get(o) && 59 if (efl_io_closer_close_on_destructor_get(o) &&
60 (!efl_io_closer_closed_get(o))) 60 (!efl_io_closer_closed_get(o)))
61 efl_io_closer_close(o); 61 {
62 efl_event_freeze(o);
63 efl_io_closer_close(o);
64 efl_event_thaw(o);
65 }
62 66
63 if (pd->resolver.thread) 67 if (pd->resolver.thread)
64 { 68 {
diff --git a/src/lib/ecore_con/efl_net_dialer_unix.c b/src/lib/ecore_con/efl_net_dialer_unix.c
index 295d1b1c0f..0493ff2f78 100644
--- a/src/lib/ecore_con/efl_net_dialer_unix.c
+++ b/src/lib/ecore_con/efl_net_dialer_unix.c
@@ -48,7 +48,11 @@ _efl_net_dialer_unix_efl_object_destructor(Eo *o, Efl_Net_Dialer_Unix_Data *pd)
48{ 48{
49 if (efl_io_closer_close_on_destructor_get(o) && 49 if (efl_io_closer_close_on_destructor_get(o) &&
50 (!efl_io_closer_closed_get(o))) 50 (!efl_io_closer_closed_get(o)))
51 efl_io_closer_close(o); 51 {
52 efl_event_freeze(o);
53 efl_io_closer_close(o);
54 efl_event_thaw(o);
55 }
52 56
53 if (pd->connect.thread) 57 if (pd->connect.thread)
54 { 58 {
diff --git a/src/lib/ecore_con/efl_net_server_udp_client.c b/src/lib/ecore_con/efl_net_server_udp_client.c
index 20cec66a7f..e9ce54ca29 100644
--- a/src/lib/ecore_con/efl_net_server_udp_client.c
+++ b/src/lib/ecore_con/efl_net_server_udp_client.c
@@ -75,7 +75,11 @@ _efl_net_server_udp_client_efl_object_destructor(Eo *o, Efl_Net_Server_Udp_Clien
75{ 75{
76 if (efl_io_closer_close_on_destructor_get(o) && 76 if (efl_io_closer_close_on_destructor_get(o) &&
77 (!efl_io_closer_closed_get(o))) 77 (!efl_io_closer_closed_get(o)))
78 efl_io_closer_close(o); 78 {
79 efl_event_freeze(o);
80 efl_io_closer_close(o);
81 efl_event_thaw(o);
82 }
79 83
80 efl_destructor(efl_super(o, MY_CLASS)); 84 efl_destructor(efl_super(o, MY_CLASS));
81 85
diff --git a/src/lib/ecore_con/efl_net_socket_fd.c b/src/lib/ecore_con/efl_net_socket_fd.c
index e79fd47d89..e0e05d6328 100644
--- a/src/lib/ecore_con/efl_net_socket_fd.c
+++ b/src/lib/ecore_con/efl_net_socket_fd.c
@@ -91,7 +91,11 @@ _efl_net_socket_fd_efl_object_destructor(Eo *o, Efl_Net_Socket_Fd_Data *pd)
91{ 91{
92 if (efl_io_closer_close_on_destructor_get(o) && 92 if (efl_io_closer_close_on_destructor_get(o) &&
93 (!efl_io_closer_closed_get(o))) 93 (!efl_io_closer_closed_get(o)))
94 efl_io_closer_close(o); 94 {
95 efl_event_freeze(o);
96 efl_io_closer_close(o);
97 efl_event_thaw(o);
98 }
95 99
96 efl_destructor(efl_super(o, MY_CLASS)); 100 efl_destructor(efl_super(o, MY_CLASS));
97 101
diff --git a/src/lib/ecore_con/efl_net_socket_ssl.c b/src/lib/ecore_con/efl_net_socket_ssl.c
index 63252b90e8..77f9620572 100644
--- a/src/lib/ecore_con/efl_net_socket_ssl.c
+++ b/src/lib/ecore_con/efl_net_socket_ssl.c
@@ -434,7 +434,11 @@ _efl_net_socket_ssl_efl_object_destructor(Eo *o, Efl_Net_Socket_Ssl_Data *pd)
434{ 434{
435 if (efl_io_closer_close_on_destructor_get(o) && 435 if (efl_io_closer_close_on_destructor_get(o) &&
436 (!efl_io_closer_closed_get(o))) 436 (!efl_io_closer_closed_get(o)))
437 efl_io_closer_close(o); 437 {
438 efl_event_freeze(o);
439 efl_io_closer_close(o);
440 efl_event_thaw(o);
441 }
438 442
439 efl_destructor(efl_super(o, MY_CLASS)); 443 efl_destructor(efl_super(o, MY_CLASS));
440 444