mirror of
https://github.com/coturn/coturn.git
synced 2025-10-28 05:21:00 +01:00
working on segfaults
This commit is contained in:
parent
6a7349d57d
commit
25a5b4267c
@ -686,7 +686,6 @@ int get_ioa_socket_from_reservation(ioa_engine_handle e, u64bits in_reservation_
|
||||
if (e && in_reservation_token && s) {
|
||||
*s = rtcp_map_get(e->map_rtcp, in_reservation_token);
|
||||
if (*s) {
|
||||
rtcp_map_del_savefd(e->map_rtcp, in_reservation_token);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -166,13 +166,14 @@ int rtcp_map_put(rtcp_map* map, rtcp_token_type token, ioa_socket_handle s) {
|
||||
* >=0 - success
|
||||
* <0 - not found
|
||||
*/
|
||||
ioa_socket_handle rtcp_map_get(const rtcp_map* map, rtcp_token_type token) {
|
||||
ioa_socket_handle rtcp_map_get(rtcp_map* map, rtcp_token_type token) {
|
||||
if(!rtcp_map_valid(map)) return NULL;
|
||||
else {
|
||||
ur_map_value_type value;
|
||||
TURN_MUTEX_LOCK(&map->mutex);
|
||||
int ret = ur_map_get(map->map,token,&value);
|
||||
//TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO,"%s: 111.111: ret=%d, value=%llu, token=%llu\n",__FUNCTION__,ret,(unsigned long)value,token);
|
||||
rtcp_map_del_savefd(map, token);
|
||||
TURN_MUTEX_UNLOCK(&map->mutex);
|
||||
if(!ret) return NULL;
|
||||
rtcp_alloc_type* rval=(rtcp_alloc_type*)value;
|
||||
@ -224,9 +225,7 @@ int rtcp_map_del(rtcp_map* map, rtcp_token_type token) {
|
||||
int rtcp_map_del_savefd(rtcp_map* map, rtcp_token_type token) {
|
||||
if(!rtcp_map_valid(map)) return 0;
|
||||
else {
|
||||
TURN_MUTEX_LOCK(&map->mutex);
|
||||
int ret = ur_map_del(map->map,token,rtcp_alloc_free_savefd);
|
||||
TURN_MUTEX_UNLOCK(&map->mutex);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ int rtcp_map_put(rtcp_map* map, rtcp_token_type key, ioa_socket_handle s);
|
||||
* >=0 - success
|
||||
* <0 - not found
|
||||
*/
|
||||
ioa_socket_handle rtcp_map_get(const rtcp_map* map, rtcp_token_type token);
|
||||
ioa_socket_handle rtcp_map_get(rtcp_map* map, rtcp_token_type token);
|
||||
|
||||
/**
|
||||
* @ret:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user