mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-30 05:56:12 +00:00
[Core] switch_channel_set_hangup_time: Coverity 1546343 Check of thread-shared field evades lock acquisition
This commit is contained in:
parent
ca9430eaeb
commit
6ccdeeef60
@ -3370,11 +3370,12 @@ SWITCH_DECLARE(void) switch_channel_set_bridge_time(switch_channel_t *channel)
|
|||||||
|
|
||||||
SWITCH_DECLARE(void) switch_channel_set_hangup_time(switch_channel_t *channel)
|
SWITCH_DECLARE(void) switch_channel_set_hangup_time(switch_channel_t *channel)
|
||||||
{
|
{
|
||||||
if (channel->caller_profile && channel->caller_profile->times && !channel->caller_profile->times->hungup) {
|
|
||||||
switch_mutex_lock(channel->profile_mutex);
|
switch_mutex_lock(channel->profile_mutex);
|
||||||
|
if (channel->caller_profile && channel->caller_profile->times && !channel->caller_profile->times->hungup) {
|
||||||
channel->caller_profile->times->hungup = switch_micro_time_now();
|
channel->caller_profile->times->hungup = switch_micro_time_now();
|
||||||
switch_mutex_unlock(channel->profile_mutex);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch_mutex_unlock(channel->profile_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user