[sr-dev] git:master:723540b2: modules/ims_usrloc_scscf: added missing db_mode check

Jason Penton jason.penton at gmail.com
Fri Jan 23 15:10:09 CET 2015


Module: kamailio
Branch: master
Commit: 723540b24b1e078eb953418365f8a99849de63ae
URL: https://github.com/kamailio/kamailio/commit/723540b24b1e078eb953418365f8a99849de63ae

Author: Jason Penton <jason.penton at gmail.com>
Committer: Jason Penton <jason.penton at gmail.com>
Date: 2015-01-23T16:09:27+02:00

modules/ims_usrloc_scscf: added missing db_mode check

---

Modified: modules/ims_usrloc_scscf/ucontact.c

---

Diff:  https://github.com/kamailio/kamailio/commit/723540b24b1e078eb953418365f8a99849de63ae.diff
Patch: https://github.com/kamailio/kamailio/commit/723540b24b1e078eb953418365f8a99849de63ae.patch

---

diff --git a/modules/ims_usrloc_scscf/ucontact.c b/modules/ims_usrloc_scscf/ucontact.c
index bc552ec..ce8d6c3 100644
--- a/modules/ims_usrloc_scscf/ucontact.c
+++ b/modules/ims_usrloc_scscf/ucontact.c
@@ -69,6 +69,7 @@
 #include "contact_hslot.h"
 
 extern struct contact_list* contact_list;
+extern int db_mode;
 
 /*!
  * \brief Create a new contact structure
@@ -383,7 +384,7 @@ int update_ucontact(struct impurecord* _r, ucontact_t* _c, ucontact_info_t* _ci)
         return -1;
     }
     
-    if (db_insert_ucontact(_r, _c) != 0) {  /* this is an insert/update */
+    if (db_mode == WRITE_THROUGH && (db_insert_ucontact(_r, _c) != 0)) {  /* this is an insert/update */
 	LM_ERR("failed to update contact in DB [%.*s]\n", _c->aor.len, _c->aor.s);
 	return -1;
     }




More information about the sr-dev mailing list