Module: sip-router
Branch: master
Commit: a5ecca6386388a8bf465c1c0cc623db18b120936
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a5ecca6…
Author: Jan Janak <jan(a)iptel.org>
Committer: Jan Janak <jan(a)iptel.org>
Date: Thu Feb 26 12:52:17 2009 +0100
Rename cfg_size to cfg_sizeof
One of kamailio modules uses libconfuse library which happens to contain
a function with the same name, and this causes a conflict. We can rename
cfg_size to cfg_sizeof to solve the problem.
Signed-off-by: Jan Janak <jan(a)iptel.org>
Acked-by: Miklos Tirpak <miklos(a)iptel.org>
---
cfg/cfg.h | 2 +-
doc/cfg.txt | 2 +-
main.c | 2 +-
modules/tm/tm.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/cfg/cfg.h b/cfg/cfg.h
index 21be1aa..f2bd85b 100644
--- a/cfg/cfg.h
+++ b/cfg/cfg.h
@@ -77,7 +77,7 @@ typedef struct _cfg_def {
int cfg_declare(char *group_name, cfg_def_t *def, void *values, int def_size,
void **handler);
-#define cfg_size(gname) \
+#define cfg_sizeof(gname) \
sizeof(struct cfg_group_##gname)
#define cfg_get(gname, handle, var) \
diff --git a/doc/cfg.txt b/doc/cfg.txt
index 730f1bf..ddfbec6 100644
--- a/doc/cfg.txt
+++ b/doc/cfg.txt
@@ -147,7 +147,7 @@ Each row consists of the following items:
static int mod_init(void)
{
- if (cfg_declare("foo", cfg_def, &default_cfg, cfg_size(foo),
+ if (cfg_declare("foo", cfg_def, &default_cfg, cfg_sizeof(foo),
&cfg_handle)
) {
/* error */
diff --git a/main.c b/main.c
index 453f578..b3f567f 100644
--- a/main.c
+++ b/main.c
@@ -1998,7 +1998,7 @@ try_again:
goto error;
}
/* declare the core cfg before the module configs */
- if (cfg_declare("core", core_cfg_def, &default_core_cfg, cfg_size(core),
+ if (cfg_declare("core", core_cfg_def, &default_core_cfg,
cfg_sizeof(core),
&core_cfg)
) {
LOG(L_CRIT, "could not declare the core configuration\n");
diff --git a/modules/tm/tm.c b/modules/tm/tm.c
index ef8c9af..9a4fea1 100644
--- a/modules/tm/tm.c
+++ b/modules/tm/tm.c
@@ -707,7 +707,7 @@ static int mod_init(void)
#endif
/* declare the configuration */
- if (cfg_declare("tm", tm_cfg_def, &default_tm_cfg, cfg_size(tm),
+ if (cfg_declare("tm", tm_cfg_def, &default_tm_cfg, cfg_sizeof(tm),
&tm_cfg)) {
LOG(L_ERR, "ERROR: mod_init: failed to declare the configuration\n");
return -1;