Module: sip-router
Branch: master
Commit: c43cc058f86e0b4396178d980baba78848d9a715
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c43cc05…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Feb 26 12:24:26 2012 +0100
cfgutls: API members renamed to avoid conflicts with core defines
---
modules_k/cfgutils/api.h | 4 ++--
modules_k/cfgutils/cfgutils.c | 7 +++++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/modules_k/cfgutils/api.h b/modules_k/cfgutils/api.h
index 25fae2a..673d196 100644
--- a/modules_k/cfgutils/api.h
+++ b/modules_k/cfgutils/api.h
@@ -33,8 +33,8 @@ typedef int (*cfgutils_unlock_f)(str *lkey);
* @brief CFGUTILS API structure
*/
typedef struct cfgutils_api {
- cfgutils_lock_f lock;
- cfgutils_unlock_f unlock;
+ cfgutils_lock_f mlock;
+ cfgutils_unlock_f munlock;
} cfgutils_api_t;
typedef int (*bind_cfgutils_f)(cfgutils_api_t* api);
diff --git a/modules_k/cfgutils/cfgutils.c b/modules_k/cfgutils/cfgutils.c
index f74ef6e..03cd25d 100644
--- a/modules_k/cfgutils/cfgutils.c
+++ b/modules_k/cfgutils/cfgutils.c
@@ -118,6 +118,7 @@ static int pv_get_random_val(struct sip_msg *msg, pv_param_t *param,
static int fixup_prob( void** param, int param_no);
static int fixup_gflags( void** param, int param_no);
+int bind_cfgutils(cfgutils_api_t *api);
static int mod_init(void);
static void mod_destroy(void);
@@ -171,6 +172,8 @@ static cmd_export_t cmds[]={
ANY_ROUTE},
{"unlock", (cmd_function)cfg_unlock, 1, fixup_spve_null, 0,
ANY_ROUTE},
+ {"bind_cfgutils", (cmd_function)bind_cfgutils, 0,
+ 0, 0, 0},
{0, 0, 0, 0, 0, 0}
};
@@ -808,8 +811,8 @@ int bind_cfgutils(cfgutils_api_t *api)
ERR("Invalid parameter value\n");
return -1;
}
- api->lock = cfgutils_lock;
- api->unlock = cfgutils_unlock;
+ api->mlock = cfgutils_lock;
+ api->munlock = cfgutils_unlock;
return 0;
}