From 0f4ecab5e9d3ad765ee266f1af41560df5f434ae Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 30 Jul 2012 16:36:20 -0500 Subject: [PATCH] FS-4481 --resolve seg is fixed but just utf-8 will not work. you need type/subtype format like text/utf-8 --- src/mod/endpoints/mod_sofia/sofia.c | 3 ++- src/mod/endpoints/mod_sofia/sofia_presence.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 777b23fad9..3ded1dccd2 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -748,7 +748,8 @@ void sofia_handle_sip_r_message(int status, sofia_profile_t *profile, nua_handle const char *call_id; int *mstatus; - if (!sip && sip->sip_call_id) { + if (!(sip && sip->sip_call_id)) { + nua_handle_destroy(nh); return; } diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index f147d6d471..e53a4fd267 100644 --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -357,7 +357,7 @@ switch_status_t sofia_presence_chat_send(switch_event_t *message_event) if (is_blocking) { sanity = 200; - while(!mstatus && --sanity) { + while(!mstatus && --sanity && !msg_nh->nh_destroyed) { switch_yield(100000); }