Skip to content
Snippets Groups Projects
Verified Commit 6e848765 authored by Iryna Antsyferova's avatar Iryna Antsyferova Committed by IOPSYS Dev
Browse files

Fix crash during internal calls, REF 14916

The crash happens randomly at internal calls. It seems like sometimes asterisk-chan-voicemngr
hangs due to some race conditions (ubus calls not responding anymore) and sometimes it crashes
in random places of the code.

What is done:

1. Refactor function for retrieving RTP statistics - add handling of ubus context the initial
fix for ubus calls race condition was done in 025ea991 line: 
`ret = ubus_invoke(get_shared_context(__FUNCTION__), endpt_id, "rtp_stats", bb.head, 
ubus_call_answer_rtp_stats, sub, 500);` The 'sub' parameter is passed as a context for the ubus 
call and needs to be handled in the ubus_call_answer_rtp_stats callback function. This part was 
missed in the initial commit.
2. Fixed parsing of blob data for ubus method callbacks. The "sip_client_status" and 
"call_status" ubus methods were wrongly copy-pasted from the event ubus method, which could lead 
to potential memory corruption during the parsing of the ubus response.
3. Added error handling for null subchannel. The subchannel is now validated in all parts of the 
code, but it was previously missed in some areas.
parent 8fcae487
Branches
No related tags found
1 merge request!89Fix crash at local calls between pbx<->fxs, REF 14916
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment