]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
S-6341:make sure to unlock too
authorMichael Jerris <mike@jerris.com>
Wed, 19 Mar 2014 20:38:53 +0000 (16:38 -0400)
committerMichael Jerris <mike@jerris.com>
Wed, 19 Mar 2014 20:38:53 +0000 (16:38 -0400)
src/mod/endpoints/mod_sofia/mod_sofia.c

index 4bc2ec0929208e84b2d9a31fc0fa8b196163075c..08f28d8a892f6aedd77a78ea063773e5660917db 100644 (file)
@@ -2052,7 +2052,8 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
                                if (switch_channel_test_flag(channel, CF_PROXY_MEDIA)) {
                                        switch_core_media_patch_sdp(tech_pvt->session);
                                        if (sofia_media_activate_rtp(tech_pvt) != SWITCH_STATUS_SUCCESS) {
-                                               return SWITCH_STATUS_FALSE;
+                                               status = SWITCH_STATUS_FALSE;
+                                               goto end_lock;
                                        }
                                }
                        } else {
@@ -2073,7 +2074,8 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
                                                        switch_core_media_patch_sdp(tech_pvt->session);
                                                        if (sofia_media_activate_rtp(tech_pvt) != SWITCH_STATUS_SUCCESS) {
                                                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "failed to activate rtp\n");
-                                                               return SWITCH_STATUS_FALSE;
+                                                               status = SWITCH_STATUS_FALSE;
+                                                               goto end_lock;
                                                        }
                                                }
                                        }
@@ -2129,7 +2131,8 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
                                        }
 
                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "3PCC-PROXY, Done waiting for PRACK\n");
-                                       return SWITCH_STATUS_SUCCESS;
+                                       status = SWITCH_STATUS_SUCCESS;
+                                       goto end_lock;
                                }
                        }