Module: kamailio Branch: master Commit: 4c9bcb4cce43b3b8f25667d52d0aea98382e7db5 URL: https://github.com/kamailio/kamailio/commit/4c9bcb4cce43b3b8f25667d52d0aea98...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2018-04-30T12:51:07+02:00
usrloc: renamed global var matching_mode to ul_matching_mode
- avoid exports conflict with the other usrloc alternative modules
---
Modified: src/modules/usrloc/ucontact.c Modified: src/modules/usrloc/urecord.c Modified: src/modules/usrloc/usrloc_mod.c Modified: src/modules/usrloc/usrloc_mod.h
---
Diff: https://github.com/kamailio/kamailio/commit/4c9bcb4cce43b3b8f25667d52d0aea98... Patch: https://github.com/kamailio/kamailio/commit/4c9bcb4cce43b3b8f25667d52d0aea98...
---
diff --git a/src/modules/usrloc/ucontact.c b/src/modules/usrloc/ucontact.c index a43c5c6c00..93b30fab05 100644 --- a/src/modules/usrloc/ucontact.c +++ b/src/modules/usrloc/ucontact.c @@ -739,7 +739,7 @@ int db_update_ucontact_addr(ucontact_t* _c) LM_DBG("contact:%.*s\n", vals1[n1].val.str_val.len, vals1[n1].val.str_val.s); n1++;
- switch (matching_mode) { + switch (ul_matching_mode) { case CONTACT_ONLY: /* update call-id */ keys2[nr_cols2] = &callid_col; @@ -796,7 +796,7 @@ int db_update_ucontact_addr(ucontact_t* _c) nr_cols2++; break; default: - LM_CRIT("unknown matching_mode %d\n", matching_mode); + LM_CRIT("unknown matching_mode %d\n", ul_matching_mode); return -1; }
@@ -1464,7 +1464,7 @@ int db_delete_ucontact_addr(ucontact_t* _c) vals[n].val.str_val = _c->c; n++;
- switch (matching_mode) { + switch (ul_matching_mode) { case CONTACT_ONLY: break; case CONTACT_CALLID: @@ -1486,7 +1486,7 @@ int db_delete_ucontact_addr(ucontact_t* _c) n++; break; default: - LM_CRIT("unknown matching_mode %d\n", matching_mode); + LM_CRIT("unknown matching_mode %d\n", ul_matching_mode); return -1; }
diff --git a/src/modules/usrloc/urecord.c b/src/modules/usrloc/urecord.c index 598cbd88fe..279ab2d17c 100644 --- a/src/modules/usrloc/urecord.c +++ b/src/modules/usrloc/urecord.c @@ -42,7 +42,7 @@ #include "usrloc.h"
/*! contact matching mode */ -int matching_mode = CONTACT_ONLY; +int ul_matching_mode = CONTACT_ONLY; /*! retransmission detection interval in seconds */ int cseq_delay = 20;
@@ -772,7 +772,7 @@ int get_ucontact(urecord_t* _r, str* _c, str* _callid, str* _path, int _cseq, no_callid = 0; *_co = 0;
- switch (matching_mode) { + switch (ul_matching_mode) { case CONTACT_ONLY: ptr = contact_match( _r->contacts, _c); break; @@ -787,7 +787,7 @@ int get_ucontact(urecord_t* _r, str* _c, str* _callid, str* _path, int _cseq, ptr = contact_match_callidonly( _r->contacts, _callid); break; default: - LM_CRIT("unknown matching_mode %d\n", matching_mode); + LM_CRIT("unknown matching_mode %d\n", ul_matching_mode); return -1; }
diff --git a/src/modules/usrloc/usrloc_mod.c b/src/modules/usrloc/usrloc_mod.c index 50eb0cb888..d0f8d22b6f 100644 --- a/src/modules/usrloc/usrloc_mod.c +++ b/src/modules/usrloc/usrloc_mod.c @@ -220,7 +220,7 @@ static param_export_t params[] = { {"connection_id_column",PARAM_STR, &con_id_col }, {"keepalive_column", PARAM_STR, &keepalive_col }, {"partition_column", PARAM_STR, &partition_col }, - {"matching_mode", INT_PARAM, &matching_mode }, + {"matching_mode", INT_PARAM, &ul_matching_mode }, {"cseq_delay", INT_PARAM, &cseq_delay }, {"fetch_rows", INT_PARAM, &ul_fetch_rows }, {"hash_size", INT_PARAM, &ul_hash_size }, @@ -308,14 +308,14 @@ static int mod_init(void) ul_hash_size = 1<<ul_hash_size;
/* check matching mode */ - switch (matching_mode) { + switch (ul_matching_mode) { case CONTACT_ONLY: case CONTACT_CALLID: case CONTACT_PATH: case CONTACT_CALLID_ONLY: break; default: - LM_ERR("invalid matching mode %d\n", matching_mode); + LM_ERR("invalid matching mode %d\n", ul_matching_mode); }
/* Register cache timer */ diff --git a/src/modules/usrloc/usrloc_mod.h b/src/modules/usrloc/usrloc_mod.h index 4b0fa35671..12735f11ee 100644 --- a/src/modules/usrloc/usrloc_mod.h +++ b/src/modules/usrloc/usrloc_mod.h @@ -111,7 +111,7 @@ extern unsigned int ul_db_srvid; #define CONTACT_PATH (2) #define CONTACT_CALLID_ONLY (3)
-extern int matching_mode; +extern int ul_matching_mode;
extern int ul_db_ops_ruid;