asterisk/channels
Naveen Albert 1ce9e1fa8f sig_analog: Fix channel leak when mwimonitor is enabled.
When mwimonitor=yes is enabled for an FXO port,
the do_monitor thread will launch mwi_thread if it thinks
there could be MWI on an FXO channel, due to the noise
threshold being satisfied. This, in turns, calls
analog_ss_thread_start in sig_analog. However, unlike
all other instances where __analog_ss_thread is called
in sig_analog, this call path does not properly set
pvt->ss_astchan to the Asterisk channel, which means
that the Asterisk channel is NULL when __analog_ss_thread
starts executing. As a result, the thread exits and the
channel is never properly cleaned up by calling ast_hangup.

This caused issues with do_monitor on incoming calls,
as it would think the channel was still owned even while
receiving events, leading to an infinite barrage of
warning messages; additionally, the channel would persist
improperly.

To fix this, the assignment is added to the call path
where it is missing (which is only used for mwi_thread).
A warning message is also added since previously there
was no indication that __analog_ss_thread was exiting
abnormally. This resolves both the channel leak and the
condition that led to the warning messages.

Resolves: #458
2023-11-28 19:56:08 +00:00
..
dahdi channels: Fix for Doxygen. 2021-11-19 09:02:06 -06:00
iax2 chan_iax2.c: Don't send unsanitized data to the logger. 2023-11-09 12:34:23 +00:00
pjsip chan_pjsip: Add PJSIPHangup dialplan app and manager action 2023-11-07 16:32:22 +00:00
Makefile res_monitor: Remove deprecated module. 2023-01-13 08:32:33 -06:00
chan_audiosocket.c Compiler fixes for GCC with -Og 2020-11-03 17:08:07 -06:00
chan_bridge_media.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
chan_console.c chan_console: Fix deadlock caused by unclean thread exit. 2023-09-20 19:15:49 +00:00
chan_dahdi.c func_channel: Expose previously unsettable options. 2023-11-28 19:54:04 +00:00
chan_dahdi.h sig_analog: Add Called Subscriber Held capability. 2023-08-22 13:30:29 +00:00
chan_iax2.c chan_iax2: Improve authentication debugging. 2023-09-20 15:38:39 +00:00
chan_motif.c channels: Fix for Doxygen. 2021-11-19 09:02:06 -06:00
chan_pjsip.c chan_pjsip: Add PJSIPHangup dialplan app and manager action 2023-11-07 16:32:22 +00:00
chan_rtp.c chan_rtp: Implement RTP glue for UnicastRTP channels 2023-09-07 11:29:30 +00:00
chan_unistim.c utils.c: Remove all usages of ast_gethostbyname() 2022-01-06 09:45:56 -06:00
console_board.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
console_gui.c channels: Spelling fixes 2021-11-16 05:35:29 -06:00
console_video.c chan_sip: Remove deprecated module. 2023-01-03 09:00:42 -06:00
console_video.h Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
sig_analog.c sig_analog: Fix channel leak when mwimonitor is enabled. 2023-11-28 19:56:08 +00:00
sig_analog.h sig_analog: Add Called Subscriber Held capability. 2023-08-22 13:30:29 +00:00
sig_pri.c progdocs: Fix for Doxygen, the hidden parts. 2021-12-02 10:37:38 -06:00
sig_pri.h progdocs: Fix for Doxygen, the hidden parts. 2021-12-02 10:37:38 -06:00
sig_ss7.c progdocs: Fix for Doxygen, the hidden parts. 2021-12-02 10:37:38 -06:00
sig_ss7.h channels: Spelling fixes 2021-11-16 05:35:29 -06:00
vcodecs.c channels: Spelling fixes 2021-11-16 05:35:29 -06:00
vgrabbers.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00