[sr-dev] git:richard.good/diameter_rx_media: ims_qos: fixed return codes on error conditions

Richard Good richard.good at smilecoms.com
Fri Mar 15 08:47:49 CET 2013


Module: sip-router
Branch: richard.good/diameter_rx_media
Commit: cbbf7634c317b7cfd3927aed76a7093fa4394517
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=cbbf7634c317b7cfd3927aed76a7093fa4394517

Author: Richard Good <richard.good at smilecoms.com>
Committer: Richard Good <richard.good at smilecoms.com>
Date:   Mon Mar 11 14:43:37 2013 +0200

ims_qos:  fixed return codes on error conditions

        - Return CSCF_RETURN_ERROR on async diameter callback error
	  instead of CSCF_RETURN_BREAK

---

 modules/ims_qos/mod.c    |    3 +--
 modules/ims_qos/rx_aar.c |    2 ++
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/ims_qos/mod.c b/modules/ims_qos/mod.c
index ac2c2ea..0d197ed 100644
--- a/modules/ims_qos/mod.c
+++ b/modules/ims_qos/mod.c
@@ -564,7 +564,6 @@ static int w_rx_aar(struct sip_msg *msg, char* str1, char* bar) {
         LM_ERR("Failed to send AAR\n");
         tmb.t_cancel_suspend(saved_t_data->tindex, saved_t_data->tlabel);
         goto error;
-        return CSCF_RETURN_BREAK;
 
 
     } else {
@@ -578,7 +577,7 @@ error:
         free_saved_transaction_global_data(saved_t_data); //only free global data if no AARs were sent. if one was sent we have to rely on the callback (CDP) to free
     //otherwise the callback will segfault
 
-    return CSCF_RETURN_BREAK;
+     return CSCF_RETURN_ERROR;
 }
 
 /* Wrapper to send AAR from config file - only used for registration */
diff --git a/modules/ims_qos/rx_aar.c b/modules/ims_qos/rx_aar.c
index 9041172..f80fc00 100644
--- a/modules/ims_qos/rx_aar.c
+++ b/modules/ims_qos/rx_aar.c
@@ -101,6 +101,8 @@ void async_aar_callback(int is_timeout, void *param, AAAMessage *aaa, long elaps
     if (tmb.t_lookup_ident(&t, data->tindex, data->tlabel) < 0) {
         LM_ERR("t_continue: transaction not found\n");
         goto error;
+    }else{
+        LM_DBG("t_continue: transaction found\n");
     }
     //we have T, lets restore our state (esp. for AVPs)
     set_avp_list(AVP_TRACK_FROM | AVP_CLASS_URI, &t->uri_avps_from);




More information about the sr-dev mailing list