[model] Redwood
[binary_type] AP
[customer] Docomo/Orange/Open
[issue#] N/A
[problem] Disconnected callback is not invoked.
[cause] When a main thread tries to close the connection, disconnected callback is not invoked.
[solution] Guarantees call of registered disconnected callback even though the main thread explictly close a socket.
[team] HomeTF
[request]
[horizontal_expansion]
Change-Id: Ia90480aca9e558d6edeb7b5a9656f89fc0fa5cc4
Name: libcom-core
Summary: Library for the light-weight IPC
-Version: 0.4.0
+Version: 0.4.1
Release: 1
Group: HomeTF/Framework
License: Apache License
EAPI int com_core_server_destroy(int handle)
{
DbgPrint("Close server handle[%d]\n", handle);
+ invoke_disconn_cb_list(handle);
secure_socket_destroy_handle(handle);
return 0;
}
EAPI int com_core_client_destroy(int handle)
{
DbgPrint("Close client handle[%d]\n", handle);
+ invoke_disconn_cb_list(handle);
secure_socket_destroy_handle(handle);
return 0;
}
if (tcb->server_handle != handle)
continue;
+ invoke_disconn_cb_list(handle);
terminate_thread(tcb);
tcb_destroy(tcb);
+ return 0;
}
dlist_foreach_safe(s_info.server_list, l, n, server) {
- if (server->handle == handle) {
- server_destroy(server);
- break;
- }
+ if (server->handle != handle)
+ continue;
+
+ invoke_disconn_cb_list(handle);
+ server_destroy(server);
+ return 0;
}
- return 0;
+ return -ENOENT;
}
/*!
if (!tcb)
return -ENOENT;
+ invoke_disconn_cb_list(handle);
terminate_thread(tcb);
tcb_destroy(tcb);
return 0;