Module: sip-router
Branch: master
Commit: b7cfc0a8139fee47d42597113dc5bd25753cbff5
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b7cfc0a…
Author: Jan Janak <jan(a)iptel.org>
Committer: Jan Janak <jan(a)iptel.org>
Date: Thu Feb 26 11:39:37 2009 +0000
cfg_size macro renamed to cfg_sizeof to avoid a conflict with one of the
functions in libconfuse, this library is used by one of the kamailio modules.
Acked by Miklos Tirpak.
---
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 81d6149..750694f 100644
--- a/main.c
+++ b/main.c
@@ -1988,7 +1988,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;