From 4ba0be7696427733e699fbf51d422d03e3a70fcf Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Sun, 25 May 2008 15:18:36 +0000 Subject: [PATCH] Thu May 22 06:48:11 EDT 2008 Pekka.Pessi@nokia.com * outbound.c: fixed klocwork issues git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8631 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/sofia-sip/.update | 2 +- libs/sofia-sip/libsofia-sip-ua/nua/outbound.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/libs/sofia-sip/.update b/libs/sofia-sip/.update index 36d5cf19c8..2ec17ac70e 100644 --- a/libs/sofia-sip/.update +++ b/libs/sofia-sip/.update @@ -1 +1 @@ -Sun May 25 11:17:39 EDT 2008 +Sun May 25 11:18:13 EDT 2008 diff --git a/libs/sofia-sip/libsofia-sip-ua/nua/outbound.c b/libs/sofia-sip/libsofia-sip-ua/nua/outbound.c index 60418ae035..b89374ba7b 100644 --- a/libs/sofia-sip/libsofia-sip-ua/nua/outbound.c +++ b/libs/sofia-sip/libsofia-sip-ua/nua/outbound.c @@ -723,6 +723,9 @@ static int create_keepalive_message(outbound_t *ob, sip_t const *regsip) unsigned d = ob->ob_keepalive.interval; + if (msg == NULL) + return -1; + assert(regsip); assert(regsip->sip_request); if (m && m->m_params) { @@ -842,6 +845,13 @@ static int response_to_keepalive_options(outbound_t *ob, if (status < 200) return 0; + if (sip == NULL) { + SU_DEBUG_3(("outbound(%p): keepalive %u %s\n", (void *)ob->ob_owner, + status, phrase)); + ob->ob_oo->oo_keepalive_error(ob->ob_owner, ob, status, phrase, TAG_END()); + return 0; + } + if (status == 401 || status == 407) { if (sip->sip_www_authenticate) challenged += auc_challenge(ob->ob_keepalive.auc,