From c7ebd6a8a84e08d8ea8152a1eb23b72fad730599 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Sun, 25 May 2008 15:17:55 +0000 Subject: [PATCH] Thu May 22 06:47:07 EDT 2008 Pekka.Pessi@nokia.com * nua_stack.c: fixed klocwork issues git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8630 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/sofia-sip/.update | 2 +- libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/libs/sofia-sip/.update b/libs/sofia-sip/.update index 301b14f687..36d5cf19c8 100644 --- a/libs/sofia-sip/.update +++ b/libs/sofia-sip/.update @@ -1 +1 @@ -Sun May 25 11:17:06 EDT 2008 +Sun May 25 11:17:39 EDT 2008 diff --git a/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c b/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c index c3ec045cd8..ded0dd37aa 100644 --- a/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c +++ b/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c @@ -543,8 +543,6 @@ void nua_stack_signal(nua_t *nua, su_msg_r msg, nua_ee_data_t *ee) nua_event_t event; int error = 0; - assert(tags); - if (nh) { if (!nh->nh_prev) nh_append(nua, nh); @@ -1043,7 +1041,7 @@ nua_handle_t *nua_stack_incoming_handle(nua_t *nua, SIPTAG_FROM(from), /* Remote AoR */ TAG_END()); - if (nua_stack_init_handle(nh->nh_nua, nh, NULL) < 0) + if (nh && nua_stack_init_handle(nua, nh, NULL) < 0) nh_destroy(nua, nh), nh = NULL; if (nh && create_dialog) { @@ -1860,8 +1858,6 @@ int nua_base_server_report(nua_server_request_t *sr, tagi_t const *tags) int terminated; int handle_can_be_terminated = initial && !sr->sr_event; - assert(nh); - if (sr->sr_application) { /* There was an error sending response */ if (sr->sr_application != sr->sr_status) @@ -2811,10 +2807,12 @@ int nua_client_check_restart(nua_client_request_t *cr, char const *phrase, sip_t const *sip) { - nua_handle_t *nh = cr->cr_owner; + nua_handle_t *nh; assert(cr && status >= 200 && phrase && sip); + nh = cr->cr_owner; + if (cr->cr_retry_count > NH_PGET(nh, retry_count)) return 0;