Commit 3b0c0729 authored by Simon Morlat's avatar Simon Morlat
Browse files

clean socket management

parent e7852469
......@@ -36,8 +36,9 @@ struct belle_sip_tls_channel{
};
static void tls_channel_close(belle_sip_tls_channel_t *obj){
ssl_close_notify(&obj->sslctx);
stream_channel_close((belle_sip_stream_channel_t*)obj);
belle_sip_socket_t sock = belle_sip_source_get_socket((belle_sip_source_t*)obj);
if (sock!=-1)
ssl_close_notify(&obj->sslctx);
}
static void tls_channel_uninit(belle_sip_tls_channel_t *obj){
......
......@@ -121,3 +121,4 @@ int belle_sip_tls_listening_point_set_verify_exceptions(belle_sip_tls_listening_
}
#endif
......@@ -138,6 +138,8 @@ static int on_udp_data(belle_sip_udp_listening_point_t *lp, unsigned int events)
,belle_sip_get_socket_error_string());
belle_sip_free(tmp);
belle_sip_udp_listening_point_uninit(lp);
/*clean all udp channels that are actually sharing the server socket with the listening points*/
belle_sip_listening_point_clean_channels((belle_sip_listening_point_t*)lp);
belle_sip_udp_listening_point_init_socket(lp);
}else{
belle_sip_channel_t *chan;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment