summaryrefslogtreecommitdiff
path: root/src/lib/ecore_con
diff options
context:
space:
mode:
authorJunsuChoi <jsuya.choi@samsung.com>2018-05-25 10:07:02 -0700
committerCedric BAIL <cedric@osg.samsung.com>2018-05-25 10:07:05 -0700
commit7ef4ab6b883f81841a131d621affa494345540fb (patch)
tree2d86e6bda87bbf829598aafaa99f4b20036251fa /src/lib/ecore_con
parent37f13a9d10e1b94c5d34ead61d316f434f7688de (diff)
ecore_con : Fix class check to check inner_socket class
Summary: cl->socket is a Efl.Net.Socket_Simple. it is not inherit the Efl.Loop.fd class. and The target of the class check have to be the inner_socket. But inner_socket is Efl.Net.Socket_Ssl. Efl.Net.Socket_Ssl class is not inherit FD class. Efl.Net.Socket_Tcp is inherit Efl.Loop.fd class. So, Need to add Efl.Net.Socket_Tcp to inheritance. (The server side is a similar hierarchy. (ssl -> tcp -> ip -> fd)) Test Plan: N/A Reviewers: cedric, jypark, myoungwoon, zmike, barbieri Reviewed By: cedric Subscribers: #committers, bowonryu, zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6168 Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/lib/ecore_con')
-rw-r--r--src/lib/ecore_con/ecore_con_legacy.c32
1 files changed, 28 insertions, 4 deletions
diff --git a/src/lib/ecore_con/ecore_con_legacy.c b/src/lib/ecore_con/ecore_con_legacy.c
index 67e491f..03ed32f 100644
--- a/src/lib/ecore_con/ecore_con_legacy.c
+++ b/src/lib/ecore_con/ecore_con_legacy.c
@@ -787,9 +787,21 @@ ecore_con_client_fd_get(const Ecore_Con_Client *cl)
787 ECORE_CON_CLIENT_CHECK_RETURN(cl, SOCKET_TO_LOOP_FD(INVALID_SOCKET)); 787 ECORE_CON_CLIENT_CHECK_RETURN(cl, SOCKET_TO_LOOP_FD(INVALID_SOCKET));
788 if (cl->socket) 788 if (cl->socket)
789 { 789 {
790 if (efl_isa(cl->socket, EFL_LOOP_FD_CLASS)) 790 Eo *inner_socket = efl_io_buffered_stream_inner_io_get(cl->socket);
791 return efl_loop_fd_get(cl->socket); 791 if (efl_isa(inner_socket, EFL_LOOP_FD_CLASS))
792 return SOCKET_TO_LOOP_FD(INVALID_SOCKET); 792 {
793 return efl_loop_fd_get(inner_socket);
794 }
795 else
796 {
797 if (efl_isa(inner_socket, EFL_NET_SOCKET_SSL_CLASS))
798 {
799 Eo* adopted_socket = NULL;
800 if (efl_net_socket_ssl_adopted_get(inner_socket, &adopted_socket, NULL))
801 if (efl_isa(adopted_socket, EFL_LOOP_FD_CLASS))
802 return efl_loop_fd_get(adopted_socket);
803 }
804 }
793 } 805 }
794 return SOCKET_TO_LOOP_FD(INVALID_SOCKET); 806 return SOCKET_TO_LOOP_FD(INVALID_SOCKET);
795} 807}
@@ -2409,7 +2421,19 @@ ecore_con_server_fd_get(const Ecore_Con_Server *svr)
2409 { 2421 {
2410 Eo *inner_dialer = efl_io_buffered_stream_inner_io_get(svr->dialer); 2422 Eo *inner_dialer = efl_io_buffered_stream_inner_io_get(svr->dialer);
2411 if (efl_isa(inner_dialer, EFL_LOOP_FD_CLASS)) 2423 if (efl_isa(inner_dialer, EFL_LOOP_FD_CLASS))
2412 return efl_loop_fd_get(inner_dialer); 2424 {
2425 return efl_loop_fd_get(inner_dialer);
2426 }
2427 else
2428 {
2429 if (efl_isa(inner_dialer, EFL_NET_DIALER_SSL_CLASS))
2430 {
2431 Eo* adopted_dialer = NULL;
2432 if (efl_net_socket_ssl_adopted_get(inner_dialer, &adopted_dialer, NULL))
2433 if (efl_isa(adopted_dialer, EFL_LOOP_FD_CLASS))
2434 return efl_loop_fd_get(adopted_dialer);
2435 }
2436 }
2413 return SOCKET_TO_LOOP_FD(INVALID_SOCKET); 2437 return SOCKET_TO_LOOP_FD(INVALID_SOCKET);
2414 } 2438 }
2415 if (svr->server) 2439 if (svr->server)