]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix stale calls then fax send/recv in some circumstance
authorGeorgiewskiy Yuriy <bottleman@icf.org.ru>
Wed, 9 Nov 2011 03:40:57 +0000 (07:40 +0400)
committerGeorgiewskiy Yuriy <bottleman@icf.org.ru>
Wed, 9 Nov 2011 03:40:57 +0000 (07:40 +0400)
src/mod/endpoints/mod_h323/changes.txt
src/mod/endpoints/mod_h323/mod_h323.cpp
src/mod/endpoints/mod_h323/mod_h323.h

index 0635cd62e87cf9541eb8460cd67fa32b7d8647c2..93a75e8b0f7a63cf07e04a4c49eedd612e8573c2 100644 (file)
@@ -1,3 +1,4 @@
+fix stale calls then fax send/recv in some circumstance 
 remove SWITCH_RTP_FLAG_AUTO_CNG - works incorrectly.
 moves the switch_rtp_request_port() call from the contructor to FSH323Connection::CreateRealTimeLogicalChannel() - fix 
     rtp port leak. tnx to Peter Olsson.
index 3fe2290e4cc6fc680f9e82398032bd93213a1782..fa195c39fabc9aa2844886f90d4472d08bae72f8 100644 (file)
@@ -33,7 +33,7 @@
  *
  * mod_h323.cpp -- H323 endpoint
  *
- *     Version 0.0.57
+ *     Version 0.0.58
 */
 
 //#define DEBUG_RTP_PACKETS
@@ -1333,7 +1333,19 @@ void FSH323Connection::OnModeChanged(const H245_ModeDescription & newMode)
                                        const char *uuid = switch_channel_get_variable(m_fsChannel, SWITCH_SIGNAL_BOND_VARIABLE); 
                                        if (uuid != NULL) {
                                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,"uuid:%s\n",uuid);
-                                               switch_channel_set_private(switch_core_session_get_channel(switch_core_session_locate(switch_channel_get_variable(m_fsChannel, SWITCH_SIGNAL_BOND_VARIABLE))), "t38_options", t38_options);
+                                               
+                                               switch_core_session_t *session = switch_core_session_locate(switch_channel_get_variable(m_fsChannel, SWITCH_SIGNAL_BOND_VARIABLE));
+                                               if (session) {
+                                                       switch_channel_t * channel = switch_core_session_get_channel(session);
+                                                       if (channel) {
+                                                               switch_channel_set_private(channel, "t38_options", t38_options);
+                                                       }else {
+                                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "no channel?\n");
+                                                       }
+                                                       switch_core_session_rwunlock(session);
+                                               }else{
+                                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "no session\n");
+                                               }                                               
                                        
                                        
                                                switch_core_session_message_t msg = { 0 };
index 3a0d7aa2356ba8b808ac518ffd51f9329dfb50db..3e046d1093e191740f657a6317bb3944318c427d 100644 (file)
@@ -32,7 +32,7 @@
  *
  * mod_h323.h -- H323 endpoint
  *
- *     Version 0.0.57
+ *     Version 0.0.58
 */
 
 #if defined(__GNUC__) && defined(HAVE_VISIBILITY)