Module: sip-router Branch: 4.0 Commit: e59bb3303252c0b47f6027ae2b99a11096521154 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e59bb330...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Tue Aug 13 09:19:02 2013 +0200
usrloc: more verbose log messages in case of failure to update db records
(cherry picked from commit 66c8e730d59f9816f09573f5300e4463e5997876)
---
modules/usrloc/urecord.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/modules/usrloc/urecord.c b/modules/usrloc/urecord.c index dd98450..75ddd1a 100644 --- a/modules/usrloc/urecord.c +++ b/modules/usrloc/urecord.c @@ -333,7 +333,9 @@ static inline void wb_timer(urecord_t* _r) /* Should we remove the contact from the database ? */ if (st_expired_ucontact(t) == 1) { if (db_delete_ucontact(t) < 0) { - LM_ERR("failed to delete contact from the database\n"); + LM_ERR("failed to delete contact from the database" + " (aor: %.*s)\n", + ptr->aor->len, ZSW(ptr->aor->s)); } }
@@ -349,7 +351,9 @@ static inline void wb_timer(urecord_t* _r)
case 1: /* insert */ if (db_insert_ucontact(ptr) < 0) { - LM_ERR("inserting contact into database failed\n"); + LM_ERR("inserting contact into database failed" + " (aor: %.*s)\n", + ptr->aor->len, ZSW(ptr->aor->s)); ptr->state = old_state; } break; @@ -360,7 +364,8 @@ static inline void wb_timer(urecord_t* _r) else res = db_update_ucontact(ptr); if (res < 0) { - LM_ERR("updating contact in db failed\n"); + LM_ERR("updating contact in db failed (aor: %.*s)\n", + ptr->aor->len, ZSW(ptr->aor->s)); ptr->state = old_state; } break;