From: Anthony Minessale Date: Mon, 22 Sep 2008 20:50:13 +0000 (+0000) Subject: Avoiding Segfault X-Git-Tag: v1.0.2~1163 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=587b6ba4209541f6e8cd41104b69d830d9211f0e;p=thirdparty%2Ffreeswitch.git Avoiding Segfault git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9618 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index eccfd5af07..91eb521e19 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -2024,6 +2024,11 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status } } + /* dirty hack to avoid race condition in the library */ + if (status == 200 || status == 183) { + switch_yield(1);// printf("Avoiding Segfault!!!\n"); + } + if (switch_channel_test_flag(channel, CF_PROXY_MODE) || switch_channel_test_flag(channel, CF_PROXY_MEDIA)) { if (!switch_test_flag(tech_pvt, TFLAG_SENT_UPDATE)) {