Module: kamailio
Branch: master
Commit: 723540b24b1e078eb953418365f8a99849de63ae
URL:
https://github.com/kamailio/kamailio/commit/723540b24b1e078eb953418365f8a99…
Author: Jason Penton <jason.penton(a)gmail.com>
Committer: Jason Penton <jason.penton(a)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/723540b24b1e078eb953418365f8a99…
Patch:
https://github.com/kamailio/kamailio/commit/723540b24b1e078eb953418365f8a99…
---
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;
}