[sr-dev] git:master: modules/ims_usrloc_scscf: better debug and error logging

Jason Penton jason.penton at gmail.com
Thu Oct 16 15:08:43 CEST 2014


Module: sip-router
Branch: master
Commit: 3e1addb00edb996b79b10126f7732e826d2ff5c4
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3e1addb00edb996b79b10126f7732e826d2ff5c4

Author: Jason Penton <jason.penton at gmail.com>
Committer: Jason Penton <jason.penton at gmail.com>
Date:   Thu Oct 16 15:08:02 2014 +0200

modules/ims_usrloc_scscf: better debug and error logging

---

 modules/ims_usrloc_scscf/subscribe.c |    5 ++++-
 modules/ims_usrloc_scscf/udomain.c   |    6 +++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/modules/ims_usrloc_scscf/subscribe.c b/modules/ims_usrloc_scscf/subscribe.c
index 3e1ae5c..c4ec371 100644
--- a/modules/ims_usrloc_scscf/subscribe.c
+++ b/modules/ims_usrloc_scscf/subscribe.c
@@ -240,13 +240,16 @@ str get_presentity_from_subscriber_dialog(str *callid, str *to_tag, str *from_ta
 int add_subscriber(impurecord_t* urec,
         subscriber_data_t* subscriber_data, reg_subscriber** _reg_subscriber, int db_load) {
 
+    reg_subscriber *s;
     LM_DBG("Adding reg subscription to IMPU record");
 
     if (!urec) {
         LM_ERR("no presentity impu record provided\n");
         return 0;
     }
-    reg_subscriber *s = new_subscriber(subscriber_data);
+    
+    s = new_subscriber(subscriber_data);
+    
 
     if (!s) return -1;
 
diff --git a/modules/ims_usrloc_scscf/udomain.c b/modules/ims_usrloc_scscf/udomain.c
index 5823148..83f4402 100644
--- a/modules/ims_usrloc_scscf/udomain.c
+++ b/modules/ims_usrloc_scscf/udomain.c
@@ -537,7 +537,7 @@ int delete_impurecord(udomain_t* _d, str* _aor, struct impurecord* _r)
 {
 	struct ucontact* c, *t;
 
-    LM_DBG("Deleting IMPURECORD\n");
+    LM_DBG("Deleting IMPURECORD [%.*s]\n", _r->public_identity.len, _r->public_identity.s);
 
 	if (_r==0) {
 		if (get_impurecord(_d, _aor, &_r) > 0) {
@@ -550,7 +550,7 @@ int delete_impurecord(udomain_t* _d, str* _aor, struct impurecord* _r)
 		t = c;
 		c = c->next;
 		if (delete_ucontact(_r, t) < 0) {
-			LM_ERR("deleting contact failed\n");
+			LM_ERR("deleting contact failed [%.*s]\n", c->aor->len, c->aor->s);
 			return -1;
 		}
 	}
@@ -562,7 +562,7 @@ int delete_impurecord(udomain_t* _d, str* _aor, struct impurecord* _r)
 	/*DB?*/
 	if (db_mode == WRITE_THROUGH
 			&& db_delete_impurecord(_d, _r) != 0) {
-		LM_ERR("error inserting contact into db");
+		LM_ERR("error deleting IMPU record from db");
 		return 0;
 	}
 




More information about the sr-dev mailing list