asterisk/channels
Naveen Albert 069d480138 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:00 +00:00
..
dahdi channels: Fix for Doxygen. 2021-11-19 09:09:45 -06:00
iax2 chan_iax2.c: Don't send unsanitized data to the logger. 2023-11-09 12:34:16 +00:00
misdn progdocs: Fix for Doxygen, the hidden parts. 2021-12-02 10:38:23 -06:00
pjsip chan_pjsip: Add PJSIPHangup dialplan app and manager action 2023-11-07 16:32:13 +00:00
sip chan_sip: Fix crash when accessing RURI before initiating outgoing call 2021-12-13 13:40:14 -06:00
Makefile core: Improve MALLOC_DEBUG for frames. 2019-11-08 10:20:13 -05:00
chan_alsa.c policy: Add deprecation and removal versions to modules. 2021-08-16 11:48:10 -05:00
chan_audiosocket.c Compiler fixes for GCC with -Og 2020-11-03 17:07:42 -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:38 +00:00
chan_dahdi.c func_channel: Expose previously unsettable options. 2023-11-28 19:53:54 +00:00
chan_dahdi.h sig_analog: Add Called Subscriber Held capability. 2023-08-22 13:30:20 +00:00
chan_iax2.c chan_iax2: Improve authentication debugging. 2023-09-20 15:38:31 +00:00
chan_mgcp.c utils.c: Remove all usages of ast_gethostbyname() 2022-01-06 14:07:05 -06:00
chan_misdn.c chan_misdn: Fix for Doxygen. 2021-11-29 09:04:26 -06:00
chan_motif.c channels: Fix for Doxygen. 2021-11-19 09:09:45 -06:00
chan_nbs.c policy: Add deprecation and removal versions to modules. 2021-08-16 11:48:10 -05:00
chan_oss.c policy: Add deprecation and removal versions to modules. 2021-08-16 11:48:10 -05:00
chan_phone.c policy: Add deprecation and removal versions to modules. 2021-08-16 11:48:10 -05:00
chan_phone.h Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
chan_pjsip.c chan_pjsip: Add PJSIPHangup dialplan app and manager action 2023-11-07 16:32:13 +00:00
chan_rtp.c chan_rtp: Implement RTP glue for UnicastRTP channels 2023-09-07 11:29:20 +00:00
chan_sip.c GCC12: Fixes for 16+ 2022-05-09 08:21:58 -05:00
chan_skinny.c utils.c: Remove all usages of ast_gethostbyname() 2022-01-06 14:07:05 -06:00
chan_unistim.c utils.c: Remove all usages of ast_gethostbyname() 2022-01-06 14:07:05 -06:00
chan_vpb.cc policy: Add deprecation and removal versions to modules. 2021-08-16 11:48:10 -05: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:37:45 -06:00
console_video.c channels: Spelling fixes 2021-11-16 05:37:45 -06:00
console_video.h Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
misdn_config.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
sig_analog.c sig_analog: Fix channel leak when mwimonitor is enabled. 2023-11-28 19:56:00 +00:00
sig_analog.h sig_analog: Add Called Subscriber Held capability. 2023-08-22 13:30:20 +00:00
sig_pri.c progdocs: Fix for Doxygen, the hidden parts. 2021-12-02 10:38:23 -06:00
sig_pri.h progdocs: Fix for Doxygen, the hidden parts. 2021-12-02 10:38:23 -06:00
sig_ss7.c progdocs: Fix for Doxygen, the hidden parts. 2021-12-02 10:38:23 -06:00
sig_ss7.h channels: Spelling fixes 2021-11-16 05:37:45 -06:00
vcodecs.c channels: Spelling fixes 2021-11-16 05:37:45 -06:00
vgrabbers.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00