]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
tidy up
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 25 Oct 2006 14:01:03 +0000 (14:01 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 25 Oct 2006 14:01:03 +0000 (14:01 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3196 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/Makefile
src/mod/endpoints/mod_sofia/mod_sofia.c

index fc75f036872810a9c465be84bcea049de062075a..da3a8b0ec56670769f1f6fe81bd97fee3101d72d 100644 (file)
@@ -1,6 +1,6 @@
 OS_ARCH         := $(subst /,_,$(shell uname -s | sed /\ /s//_/))
 VERSION = sofia-sip-1.12
-TARBALL = sofia-sip-1.12.3.5.tar.gz
+TARBALL = sofia-sip-1.12.3.6.tar.gz
 CFLAGS += -I. -I$(PREFIX)/include/$(VERSION)
 LDFLAGS += -lsofia-sip-ua
 LINKER=$(CC)
index 804efd7213d39e59583072ce87d3ac1ddb0284aa..c05a5ccba28b2424164694b6b060abc343f4a316 100644 (file)
@@ -1142,15 +1142,17 @@ static switch_status_t sofia_on_hangup(switch_core_session_t *session)
        channel = switch_core_session_get_channel(session);
        assert(channel != NULL);
 
-       cause = switch_channel_get_cause(channel);
-       sip_cause = hangup_cause_to_sip(cause);
-
        tech_pvt = (private_object_t *) switch_core_session_get_private(session);
        assert(tech_pvt != NULL);
 
-       deactivate_rtp(tech_pvt);
+       if (switch_test_flag(tech_pvt, TFLAG_BYE)) {
+               return SWITCH_STATUS_SUCCESS;
+       }
 
-       su_home_deinit(tech_pvt->home);
+       cause = switch_channel_get_cause(channel);
+       sip_cause = hangup_cause_to_sip(cause);
+
+       deactivate_rtp(tech_pvt);
 
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Channel %s hanging up, cause: %s\n", 
                          switch_channel_get_name(channel), switch_channel_cause2str(cause), sip_cause);
@@ -1191,6 +1193,11 @@ static switch_status_t sofia_on_hangup(switch_core_session_t *session)
        switch_set_flag_locked(tech_pvt, TFLAG_BYE);
        switch_clear_flag_locked(tech_pvt, TFLAG_IO);
 
+       if (tech_pvt->home) {
+               su_home_deinit(tech_pvt->home);
+               tech_pvt->home = NULL;
+       }
+
        return SWITCH_STATUS_SUCCESS;
 }