Module: kamailio
Branch: master
Commit: 44b465350faa5f640262b693dfbb7959921b4cea
URL:
https://github.com/kamailio/kamailio/commit/44b465350faa5f640262b693dfbb795…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-05-30T13:16:07+02:00
ims_usrloc_pcscf: same type for init flag variable
- it was defined as int but the extern declaration was unsigned
- added ims_ulp_ prefix to avoid global scope conflict with other modules
---
Modified: src/modules/ims_usrloc_pcscf/ims_usrloc_pcscf_mod.c
Modified: src/modules/ims_usrloc_pcscf/usrloc.c
---
Diff:
https://github.com/kamailio/kamailio/commit/44b465350faa5f640262b693dfbb795…
Patch:
https://github.com/kamailio/kamailio/commit/44b465350faa5f640262b693dfbb795…
---
diff --git a/src/modules/ims_usrloc_pcscf/ims_usrloc_pcscf_mod.c
b/src/modules/ims_usrloc_pcscf/ims_usrloc_pcscf_mod.c
index fe9a1f5f02..26aaa2773b 100644
--- a/src/modules/ims_usrloc_pcscf/ims_usrloc_pcscf_mod.c
+++ b/src/modules/ims_usrloc_pcscf/ims_usrloc_pcscf_mod.c
@@ -77,13 +77,13 @@ int expires_grace = 3600; //default is a grace period of 1 hour -
after this c
* Module parameters and their default values
*/
str usrloc_debug_file = str_init(DEFAULT_DBG_FILE);
-int usrloc_debug = 0;
-int ul_hash_size = 9;
-int init_flag = 0;
-str db_url = str_init(DEFAULT_DB_URL); /*!< Database URL */
-int timer_interval = 60; /*!< Timer interval in seconds */
-int db_mode = 0; /*!< Database sync scheme: 0-no db, 1-write through,
2-write back, 3-only db */
-int ul_fetch_rows = 2000;
+int usrloc_debug = 0;
+int ul_hash_size = 9;
+int ims_ulp_init_flag = 0;
+str db_url = str_init(DEFAULT_DB_URL); /*!< Database URL */
+int timer_interval = 60; /*!< Timer interval in seconds */
+int db_mode = 0; /*!< Database sync scheme: 0-no db, 1-write through,
2-write back, 3-only db */
+int ul_fetch_rows = 2000;
int match_contact_host_port = 1; /*!< Should we match contact just based on rui
host and port*/
db1_con_t* ul_dbh = 0;
@@ -198,7 +198,7 @@ static int mod_init(void) {
LM_DBG("Running in DB mode %i\n", db_mode);
}
- init_flag = 1;
+ ims_ulp_init_flag = 1;
return 0;
}
diff --git a/src/modules/ims_usrloc_pcscf/usrloc.c
b/src/modules/ims_usrloc_pcscf/usrloc.c
index 66c37ffe5f..418e1859bc 100644
--- a/src/modules/ims_usrloc_pcscf/usrloc.c
+++ b/src/modules/ims_usrloc_pcscf/usrloc.c
@@ -51,14 +51,14 @@
#include "ims_usrloc_pcscf_mod.h"
#include "../../core/parser/parse_uri.h"
-extern unsigned int init_flag;
+extern int ims_ulp_init_flag;
int bind_usrloc(usrloc_api_t* api) {
if (!api) {
LM_ERR("invalid parameter value\n");
return -1;
}
- if (init_flag == 0) {
+ if (ims_ulp_init_flag == 0) {
LM_ERR("configuration error - trying to bind to usrloc module"
" before being initialized\n");
return -1;