[Freeswitch-svn] [commit] r4934 - freeswitch/trunk/src/mod/endpoints/mod_wanpipe
Freeswitch SVN
anthm at freeswitch.org
Sat Apr 14 13:16:32 EDT 2007
Author: anthm
Date: Sat Apr 14 13:16:31 2007
New Revision: 4934
Modified:
freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c
Log:
fix dtmf after hangup race condition
Modified: freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c Sat Apr 14 13:16:31 2007
@@ -876,6 +876,10 @@
tech_pvt = switch_core_session_get_private(session);
assert(tech_pvt != NULL);
+ if (switch_test_flag(tech_pvt, TFLAG_BYE) || tech_pvt->wpsock->fd < 0) {
+ return SWITCH_STATUS_GENERR;
+ }
+
if (!tech_pvt->dtmf_buffer) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Allocate DTMF Buffer....");
if (switch_buffer_create_dynamic(&tech_pvt->dtmf_buffer, 1024, 3192, 0) != SWITCH_STATUS_SUCCESS) {
@@ -907,6 +911,9 @@
tech_pvt = (private_object_t *) switch_core_session_get_private(session);
assert(tech_pvt != NULL);
+ if (switch_test_flag(tech_pvt, TFLAG_BYE) || tech_pvt->wpsock->fd < 0) {
+ return SWITCH_STATUS_GENERR;
+ }
switch (msg->message_id) {
case SWITCH_MESSAGE_INDICATE_NOMEDIA:
More information about the Freeswitch-svn
mailing list