فهرست منبع

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.

Jan Janak 16 سال پیش
والد
کامیت
b7cfc0a813
4فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 1 1
      cfg/cfg.h
  2. 1 1
      doc/cfg.txt
  3. 1 1
      main.c
  4. 1 1
      modules/tm/tm.c

+ 1 - 1
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) \

+ 1 - 1
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 */

+ 1 - 1
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");

+ 1 - 1
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;