Browse code

The fixup function prototypes of the config variables have been extended with the group name. All the fixup functions have been updated.

Miklos Tirpak authored on 13/03/2009 13:59:28
Showing 25 changed files
... ...
@@ -1287,10 +1287,10 @@ assign_stm:
1287 1287
 	| UDP_MTU EQUAL NUMBER { default_core_cfg.udp_mtu=$3; }
1288 1288
 	| UDP_MTU EQUAL error { yyerror("number expected"); }
1289 1289
 	| FORCE_RPORT EQUAL NUMBER 
1290
-		{ default_core_cfg.force_rport=$3; fix_global_req_flags(0); }
1290
+		{ default_core_cfg.force_rport=$3; fix_global_req_flags(0, 0); }
1291 1291
 	| FORCE_RPORT EQUAL error { yyerror("boolean value expected"); }
1292 1292
 	| UDP_MTU_TRY_PROTO EQUAL proto
1293
-		{ default_core_cfg.udp_mtu_try_proto=$3; fix_global_req_flags(0); }
1293
+		{ default_core_cfg.udp_mtu_try_proto=$3; fix_global_req_flags(0, 0); }
1294 1294
 	| UDP_MTU_TRY_PROTO EQUAL error
1295 1295
 		{ yyerror("TCP, TLS, SCTP or UDP expected"); }
1296 1296
 	| cfg_var
... ...
@@ -56,8 +56,8 @@
56 56
 /* variable is read-only */
57 57
 #define CFG_READONLY		(1U<<(2*CFG_INPUT_SHIFT+1))
58 58
 
59
-typedef int (*cfg_on_change)(void *, str *, void **);
60
-typedef void (*cfg_on_set_child)(str *);
59
+typedef int (*cfg_on_change)(void *, str *, str *, void **);
60
+typedef void (*cfg_on_set_child)(str *, str *);
61 61
 
62 62
 /* strutrure to be used by the module interface */
63 63
 typedef struct _cfg_def {
... ...
@@ -258,7 +258,7 @@ int cfg_set_now(cfg_ctx_t *ctx, str *group_name, str *var_name,
258 258
 	cfg_mapping_t	*var;
259 259
 	void		*p, *v;
260 260
 	cfg_block_t	*block = NULL;
261
-	str		s;
261
+	str		s, s2;
262 262
 	char		*old_string = NULL;
263 263
 	char		**replaced = NULL;
264 264
 	cfg_child_cb_t	*child_cb = NULL;
... ...
@@ -300,6 +300,7 @@ int cfg_set_now(cfg_ctx_t *ctx, str *group_name, str *var_name,
300 300
 		There is no need to set a temporary cfg handle,
301 301
 		becaue a single variable is changed */
302 302
 		if (var->def->on_change_cb(*(group->handle),
303
+						group_name,
303 304
 						var_name,
304 305
 						&v) < 0) {
305 306
 			LOG(L_ERR, "ERROR: cfg_set_now(): fixup failed\n");
... ...
@@ -311,9 +312,11 @@ int cfg_set_now(cfg_ctx_t *ctx, str *group_name, str *var_name,
311 311
 	if (var->def->on_set_child_cb) {
312 312
 		/* get the name of the variable from the internal struct,
313 313
 		because var_name may be freed before the callback needs it */
314
-		s.s = var->def->name;
315
-		s.len = var->name_len;
316
-		child_cb = cfg_child_cb_new(&s,
314
+		s.s = group->name;
315
+		s.len = group->name_len;
316
+		s2.s = var->def->name;
317
+		s2.len = var->name_len;
318
+		child_cb = cfg_child_cb_new(&s, &s2,
317 319
 					var->def->on_set_child_cb);
318 320
 		if (!child_cb) {
319 321
 			LOG(L_ERR, "ERROR: cfg_set_now(): not enough shm memory\n");
... ...
@@ -579,6 +582,7 @@ int cfg_set_delayed(cfg_ctx_t *ctx, str *group_name, str *var_name,
579 579
 		}
580 580
 			
581 581
 		if (var->def->on_change_cb(temp_handle,
582
+						group_name,
582 583
 						var_name,
583 584
 						&v) < 0) {
584 585
 			LOG(L_ERR, "ERROR: cfg_set_delayed(): fixup failed\n");
... ...
@@ -711,7 +715,7 @@ int cfg_commit(cfg_ctx_t *ctx)
711 711
 	cfg_child_cb_t	*child_cb_last = NULL;
712 712
 	int	size;
713 713
 	void	*p;
714
-	str	s;
714
+	str	s, s2;
715 715
 
716 716
 	if (!ctx) {
717 717
 		LOG(L_ERR, "ERROR: cfg_commit(): context is undefined\n");
... ...
@@ -740,9 +744,11 @@ int cfg_commit(cfg_ctx_t *ctx)
740 740
 
741 741
 
742 742
 		if (changed->var->def->on_set_child_cb) {
743
-			s.s = changed->var->def->name;
744
-			s.len = changed->var->name_len;
745
-			child_cb = cfg_child_cb_new(&s,
743
+			s.s = changed->group->name;
744
+			s.len = changed->group->name_len;
745
+			s2.s = changed->var->def->name;
746
+			s2.len = changed->var->name_len;
747
+			child_cb = cfg_child_cb_new(&s, &s2,
746 748
 					changed->var->def->on_set_child_cb);
747 749
 			if (!child_cb) goto error0;
748 750
 
... ...
@@ -317,7 +317,7 @@ int cfg_init(void)
317 317
 	This stucture will be the entry point for the child processes, and
318 318
 	will be freed later, when none of the processes refers to it */
319 319
 	*cfg_child_cb_first = *cfg_child_cb_last =
320
-		cfg_child_cb_new(NULL, NULL);
320
+		cfg_child_cb_new(NULL, NULL, NULL);
321 321
 
322 322
 	if (!*cfg_child_cb_first) goto error;
323 323
 
... ...
@@ -552,7 +552,7 @@ void cfg_install_global(cfg_block_t *block, char **replaced,
552 552
 }
553 553
 
554 554
 /* creates a structure for a per-child process callback */
555
-cfg_child_cb_t *cfg_child_cb_new(str *name, cfg_on_set_child cb)
555
+cfg_child_cb_t *cfg_child_cb_new(str *gname, str *name, cfg_on_set_child cb)
556 556
 {
557 557
 	cfg_child_cb_t	*cb_struct;
558 558
 
... ...
@@ -562,6 +562,10 @@ cfg_child_cb_t *cfg_child_cb_new(str *name, cfg_on_set_child cb)
562 562
 		return NULL;
563 563
 	}
564 564
 	memset(cb_struct, 0, sizeof(cfg_child_cb_t));
565
+	if (gname) {
566
+		cb_struct->gname.s = gname->s;
567
+		cb_struct->gname.len = gname->len;
568
+	}
565 569
 	if (name) {
566 570
 		cb_struct->name.s = name->s;
567 571
 		cb_struct->name.len = name->len;
... ...
@@ -98,7 +98,7 @@ typedef struct _cfg_block {
98 98
 typedef struct _cfg_child_cb {
99 99
 	atomic_t		refcnt; /* number of child processes
100 100
 					referring to the element */
101
-	str			name;	/* name of the variable that has changed */
101
+	str			gname, name;	/* name of the variable that has changed */
102 102
 	cfg_on_set_child	cb;	/* callback function that has to be called */
103 103
 
104 104
 	struct _cfg_child_cb	*next;
... ...
@@ -232,7 +232,7 @@ static inline void cfg_update_local(void)
232 232
 			}
233 233
 		}
234 234
 		/* execute the callback */
235
-		cfg_child_cb->cb(&cfg_child_cb->name);
235
+		cfg_child_cb->cb(&cfg_child_cb->gname, &cfg_child_cb->name);
236 236
 	}
237 237
 }
238 238
 
... ...
@@ -280,7 +280,7 @@ void cfg_install_global(cfg_block_t *block, char **replaced,
280 280
 			cfg_child_cb_t *cb_first, cfg_child_cb_t *cb_last);
281 281
 
282 282
 /* creates a structure for a per-child process callback */
283
-cfg_child_cb_t *cfg_child_cb_new(str *name, cfg_on_set_child cb);
283
+cfg_child_cb_t *cfg_child_cb_new(str *gname, str *name, cfg_on_set_child cb);
284 284
 
285 285
 /* free the memory allocated for a child cb list */
286 286
 void cfg_child_cb_free(cfg_child_cb_t *child_cb_first);
... ...
@@ -265,7 +265,7 @@ void destroy_dns_cache()
265 265
 }
266 266
 
267 267
 /* set the value of dns_flags */
268
-void fix_dns_flags(str *name)
268
+void fix_dns_flags(str *gname, str *name)
269 269
 {
270 270
 	/* restore the original value of dns_cache_flags first
271 271
 	 * (DNS_IPV4_ONLY may have been set only because dns_try_ipv6
... ...
@@ -300,7 +300,7 @@ void fix_dns_flags(str *name)
300 300
 /* fixup function for use_dns_failover
301 301
  * verifies that use_dns_cache is set to 1
302 302
  */
303
-int use_dns_failover_fixup(void *handle, str *name, void **val)
303
+int use_dns_failover_fixup(void *handle, str *gname, str *name, void **val)
304 304
 {
305 305
 	if ((int)(long)(*val) && !cfg_get(core, handle, use_dns_cache)) {
306 306
 		LOG(L_ERR, "ERROR: use_dns_failover_fixup(): "
... ...
@@ -314,7 +314,7 @@ int use_dns_failover_fixup(void *handle, str *name, void **val)
314 314
 /* fixup function for use_dns_cache
315 315
  * verifies that dns_cache_init is set to 1
316 316
  */
317
-int use_dns_cache_fixup(void *handle, str *name, void **val)
317
+int use_dns_cache_fixup(void *handle, str *gname, str *name, void **val)
318 318
 {
319 319
 	if ((int)(long)(*val) && !dns_cache_init) {
320 320
 		LOG(L_ERR, "ERROR: use_dns_cache_fixup(): "
... ...
@@ -332,7 +332,7 @@ int use_dns_cache_fixup(void *handle, str *name, void **val)
332 332
 }
333 333
 
334 334
 /* KByte to Byte conversion */
335
-int dns_cache_max_mem_fixup(void *handle, str *name, void **val)
335
+int dns_cache_max_mem_fixup(void *handle, str *gname, str *name, void **val)
336 336
 {
337 337
 	unsigned int    u;
338 338
 
... ...
@@ -407,7 +407,7 @@ int init_dns_cache()
407 407
 	if (default_core_cfg.use_dns_cache==0)
408 408
 		default_core_cfg.use_dns_failover=0; /* cannot work w/o dns_cache support */
409 409
 	/* fix flags */
410
-	fix_dns_flags(NULL);
410
+	fix_dns_flags(NULL, NULL);
411 411
 
412 412
 	dns_timer_h=timer_alloc();
413 413
 	if (dns_timer_h==0){
... ...
@@ -178,10 +178,10 @@ struct dns_srv_handle{
178 178
 
179 179
 const char* dns_strerror(int err);
180 180
 
181
-void fix_dns_flags(str *name);
182
-int use_dns_failover_fixup(void *handle, str *name, void **val);
183
-int use_dns_cache_fixup(void *handle, str *name, void **val);
184
-int dns_cache_max_mem_fixup(void *handle, str *name, void **val);
181
+void fix_dns_flags(str *gname, str *name);
182
+int use_dns_failover_fixup(void *handle, str *gname, str *name, void **val);
183
+int use_dns_cache_fixup(void *handle, str *gname, str *name, void **val);
184
+int dns_cache_max_mem_fixup(void *handle, str *gname, str *name, void **val);
185 185
 int init_dns_cache();
186 186
 #ifdef USE_DNS_CACHE_STATS
187 187
 int init_dns_cache_stats(int iproc_num);
... ...
@@ -129,7 +129,7 @@ Each row consists of the following items:
129 129
   handle within the fixup function. String and str values are cloned to
130 130
   shm memory by the framework. The callback type is:
131 131
 
132
-  typedef int (*cfg_on_change)(void *temp_handle, str *var_name, void **value);
132
+  typedef int (*cfg_on_change)(void *temp_handle, str *group_name, str *var_name, void **value);
133 133
 
134 134
 - per-child process callback function (optional) that is called by each child
135 135
   process separately, after the new values have been committed, and the
... ...
@@ -137,7 +137,7 @@ Each row consists of the following items:
137 137
   longer be used by the process. (Useful for fix-ups that cannot be done
138 138
   in shm memory, for example regexp compilation.)
139 139
 
140
-  typedef void (*cfg_on_set_child)(str *var_name);
140
+  typedef void (*cfg_on_set_child)(str *group_name, str *var_name);
141 141
 
142 142
 - description of the variable
143 143
 
... ...
@@ -83,7 +83,7 @@ int str2facility(char *s)
83 83
 }
84 84
 
85 85
 /* fixup function for log_facility cfg parameter */
86
-int log_facility_fixup(void *handle, str *name, void **val)
86
+int log_facility_fixup(void *handle, str *gname, str *name, void **val)
87 87
 {
88 88
 	int	i;
89 89
 
... ...
@@ -108,7 +108,7 @@ extern volatile int dprint_crit;
108 108
 #endif
109 109
 
110 110
 int str2facility(char *s);
111
-int log_facility_fixup(void *handle, str *name, void **val);
111
+int log_facility_fixup(void *handle, str *gname, str *name, void **val);
112 112
 
113 113
 
114 114
 /*
... ...
@@ -1176,7 +1176,7 @@ void dst_blst_add(rpc_t* rpc, void* ctx)
1176 1176
 /* fixup function for use_dst_blacklist
1177 1177
  * verifies that dst_blacklist_init is set to 1
1178 1178
  */
1179
-int use_dst_blacklist_fixup(void *handle, str *name, void **val)
1179
+int use_dst_blacklist_fixup(void *handle, str *gname, str *name, void **val)
1180 1180
 {
1181 1181
 	if ((int)(long)(*val) && !dst_blacklist_init) {
1182 1182
 		LOG(L_ERR, "ERROR: use_dst_blacklist_fixup(): "
... ...
@@ -1188,7 +1188,7 @@ int use_dst_blacklist_fixup(void *handle, str *name, void **val)
1188 1188
 }
1189 1189
 
1190 1190
 /* KByte to Byte conversion */
1191
-int blst_max_mem_fixup(void *handle, str *name, void **val)
1191
+int blst_max_mem_fixup(void *handle, str *gname, str *name, void **val)
1192 1192
 {
1193 1193
 	unsigned int	u;
1194 1194
 
... ...
@@ -116,8 +116,8 @@ int dst_blacklist_del(struct dest_info* si, struct sip_msg* msg);
116 116
  */
117 117
 void dst_blst_flush(void);
118 118
 
119
-int use_dst_blacklist_fixup(void *handle, str *name, void **val);
119
+int use_dst_blacklist_fixup(void *handle, str *gname, str *name, void **val);
120 120
 /* KByte to Byte conversion */
121
-int blst_max_mem_fixup(void *handle, str *name, void **val);
121
+int blst_max_mem_fixup(void *handle, str *gname, str *name, void **val);
122 122
 
123 123
 #endif
... ...
@@ -392,7 +392,7 @@ int cancel_b_flags_get(unsigned int* f, int m)
392 392
 
393 393
 /* fixup function for the default cancel branch method/flags
394 394
  * (called by the configuration framework) */
395
-int cancel_b_flags_fixup(void* handle, str* name, void** val)
395
+int cancel_b_flags_fixup(void* handle, str* gname, str* name, void** val)
396 396
 {
397 397
 	unsigned int m,f;
398 398
 	int ret;
... ...
@@ -115,7 +115,7 @@ inline short static should_cancel_branch( struct cell *t, int b, int noreply )
115 115
 
116 116
 const char* rpc_cancel_doc[2];
117 117
 void rpc_cancel(rpc_t* rpc, void* c);
118
-int cancel_b_flags_fixup(void* handle, str* name, void** val);
118
+int cancel_b_flags_fixup(void* handle, str* gname, str* name, void** val);
119 119
 int cancel_b_flags_get(unsigned int* f, int m);
120 120
 
121 121
 #endif
... ...
@@ -1297,7 +1297,7 @@ int t_replicate(struct sip_msg *p_msg,  struct proxy_l *proxy, int proto )
1297 1297
 }
1298 1298
 
1299 1299
 /* fixup function for reparse_on_dns_failover modparam */
1300
-int reparse_on_dns_failover_fixup(void *handle, str *name, void **val)
1300
+int reparse_on_dns_failover_fixup(void *handle, str *gname, str *name, void **val)
1301 1301
 {
1302 1302
 #ifdef USE_DNS_FAILOVER
1303 1303
 	if ((int)(long)(*val) && mhomed) {
... ...
@@ -76,7 +76,7 @@ int t_send_branch( struct cell *t, int branch, struct sip_msg* p_msg ,
76 76
 					struct proxy_l * proxy, int lock_replies);
77 77
 int t_relay_cancel(struct sip_msg* p_msg);
78 78
 
79
-int reparse_on_dns_failover_fixup(void *handle, str *name, void **val);
79
+int reparse_on_dns_failover_fixup(void *handle, str *gname, str *name, void **val);
80 80
 
81 81
 #endif
82 82
 
... ...
@@ -233,7 +233,7 @@ error:
233 233
 /* fixup function for the timer values
234 234
  * (called by the configuration framework)
235 235
  */
236
-int timer_fixup(void *handle, str *name, void **val)
236
+int timer_fixup(void *handle, str *gname, str *name, void **val)
237 237
 {
238 238
 	ticks_t	t;
239 239
 
... ...
@@ -79,7 +79,7 @@ extern struct msgid_var user_noninv_max_lifetime;
79 79
 
80 80
 
81 81
 extern int tm_init_timers();
82
-int timer_fixup(void *handle, str *name, void **val);
82
+int timer_fixup(void *handle, str *gname, str *name, void **val);
83 83
 
84 84
 ticks_t wait_handler(ticks_t t, struct timer_ln *tl, void* data);
85 85
 ticks_t retr_buf_handler(ticks_t t, struct timer_ln *tl, void* data);
... ...
@@ -162,7 +162,7 @@ static unsigned int global_req_flags=0;
162 162
 /** per process fixup function for global_req_flags.
163 163
   * It should be called from the configuration framework.
164 164
   */
165
-void fix_global_req_flags( str* name)
165
+void fix_global_req_flags(str* gname, str* name)
166 166
 {
167 167
 	global_req_flags=0;
168 168
 	switch(cfg_get(core, core_cfg, udp_mtu_try_proto)){
... ...
@@ -150,6 +150,6 @@ char * build_all( struct sip_msg* msg, int adjust_clen,
150 150
 			struct dest_info* send_info);
151 151
 
152 152
 /** cfg framework fixup */
153
-void fix_global_req_flags( str* name);
153
+void fix_global_req_flags(str* gname, str* name);
154 154
 
155 155
 #endif
... ...
@@ -522,7 +522,7 @@ end:
522 522
  * Per-child process callback that is called
523 523
  * when mem_dump_pkg cfg var is changed.
524 524
  */
525
-void mem_dump_pkg_cb(str *name)
525
+void mem_dump_pkg_cb(str *gname, str *name)
526 526
 {
527 527
 	int	old_memlog;
528 528
 
... ...
@@ -545,7 +545,7 @@ void mem_dump_pkg_cb(str *name)
545 545
  * fixup function that is called
546 546
  * when mem_dump_shm cfg var is set.
547 547
  */
548
-int mem_dump_shm_fixup(void *handle, str *name, void **val)
548
+int mem_dump_shm_fixup(void *handle, str *gname, str *name, void **val)
549 549
 {
550 550
 	int	old_memlog;
551 551
 
... ...
@@ -101,11 +101,11 @@ int fork_tcp_process(int child_id,char *desc,int r,int *reader_fd_1);
101 101
 #endif
102 102
 
103 103
 #ifdef PKG_MALLOC
104
-void mem_dump_pkg_cb(str *name);
104
+void mem_dump_pkg_cb(str *gname, str *name);
105 105
 #endif
106 106
 
107 107
 #ifdef SHM_MEM
108
-int mem_dump_shm_fixup(void *handle, str *name, void **val);
108
+int mem_dump_shm_fixup(void *handle, str *gname, str *name, void **val);
109 109
 #endif
110 110
 
111 111
 #endif
... ...
@@ -159,7 +159,7 @@ int resolv_init()
159 159
  * This function must be called by each child process whenever
160 160
  * a resolver option changes
161 161
  */
162
-void resolv_reinit(str *name)
162
+void resolv_reinit(str *gname, str *name)
163 163
 {
164 164
 	_resolv_init();
165 165
 
... ...
@@ -173,14 +173,14 @@ void resolv_reinit(str *name)
173 173
 /* fixup function for dns_reinit variable
174 174
  * (resets the variable to 0)
175 175
  */
176
-int dns_reinit_fixup(void *handle, str *name, void **val)
176
+int dns_reinit_fixup(void *handle, str *gname, str *name, void **val)
177 177
 {
178 178
 	*val = (void *)(long)0;
179 179
 	return 0;
180 180
 }
181 181
 
182 182
 /* wrapper function to recalculate the naptr protocol preferences */
183
-void reinit_naptr_proto_prefs(str *name)
183
+void reinit_naptr_proto_prefs(str *gname, str *name)
184 184
 {
185 185
 #ifdef USE_NAPTR
186 186
 	init_naptr_proto_prefs();
... ...
@@ -190,7 +190,7 @@ void reinit_naptr_proto_prefs(str *name)
190 190
 /* fixup function for dns_try_ipv6
191 191
  * verifies that SER really listens on an ipv6 interface
192 192
  */
193
-int dns_try_ipv6_fixup(void *handle, str *name, void **val)
193
+int dns_try_ipv6_fixup(void *handle, str *gname, str *name, void **val)
194 194
 {
195 195
 	if ((int)(long)(*val) && !(socket_types & SOCKET_T_IPV6)) {
196 196
 		LOG(L_ERR, "ERROR: dns_try_ipv6_fixup(): "
... ...
@@ -408,10 +408,10 @@ skip_ipv4:
408 408
 int resolv_init();
409 409
 
410 410
 /* callback/fixup functions executed by the configuration framework */
411
-void resolv_reinit(str *name);
412
-int dns_reinit_fixup(void *handle, str *name, void **val);
413
-int dns_try_ipv6_fixup(void *handle, str *name, void **val);
414
-void reinit_naptr_proto_prefs(str *name);
411
+void resolv_reinit(str *gname, str *name);
412
+int dns_reinit_fixup(void *handle, str *gname, str *name, void **val);
413
+int dns_try_ipv6_fixup(void *handle, str *gname, str *name, void **val);
414
+void reinit_naptr_proto_prefs(str *gname, str *name);
415 415
 
416 416
 #ifdef DNS_WATCHDOG_SUPPORT
417 417
 /* callback function that is called by the child processes
... ...
@@ -65,10 +65,10 @@ struct cfg_group_tcp tcp_default_cfg;
65 65
 
66 66
 
67 67
 
68
-static int fix_connect_to(void* cfg_h, str* name, void** val);
69
-static int fix_send_to(void* cfg_h, str* name, void** val);
70
-static int fix_con_lt(void* cfg_h, str* name, void** val);
71
-static int fix_max_conns(void* cfg_h, str* name, void** val);
68
+static int fix_connect_to(void* cfg_h, str* gname, str* name, void** val);
69
+static int fix_send_to(void* cfg_h, str* gname, str* name, void** val);
70
+static int fix_con_lt(void* cfg_h, str* gname, str* name, void** val);
71
+static int fix_max_conns(void* cfg_h, str* gname, str* name, void** val);
72 72
 
73 73
 
74 74
 
... ...
@@ -216,7 +216,7 @@ static void fix_timeout(char* name, int* to, int default_val, unsigned max_val)
216 216
 
217 217
 
218 218
 
219
-static int fix_connect_to(void* cfg_h, str* name, void** val)
219
+static int fix_connect_to(void* cfg_h, str* gname, str* name, void** val)
220 220
 {
221 221
 	int v;
222 222
 	v=(int)(long)*val;
... ...
@@ -227,7 +227,7 @@ static int fix_connect_to(void* cfg_h, str* name, void** val)
227 227
 }
228 228
 
229 229
 
230
-static int fix_send_to(void* cfg_h, str* name, void** val)
230
+static int fix_send_to(void* cfg_h, str* gname, str* name, void** val)
231 231
 {
232 232
 	int v;
233 233
 	v=(int)(long)*val;
... ...
@@ -241,7 +241,7 @@ static int fix_send_to(void* cfg_h, str* name, void** val)
241 241
 }
242 242
 
243 243
 
244
-static int fix_con_lt(void* cfg_h, str* name, void** val)
244
+static int fix_con_lt(void* cfg_h, str* gname, str* name, void** val)
245 245
 {
246 246
 	int v;
247 247
 	v=S_TO_TICKS((int)(long)*val);
... ...
@@ -252,7 +252,7 @@ static int fix_con_lt(void* cfg_h, str* name, void** val)
252 252
 }
253 253
 
254 254
 
255
-static int fix_max_conns(void* cfg_h, str* name, void** val)
255
+static int fix_max_conns(void* cfg_h, str* gname, str* name, void** val)
256 256
 {
257 257
 	int v;
258 258
 	v=(int)(long)*val;
... ...
@@ -288,7 +288,7 @@ static int tcp_cfg_def_fix(char* name, int* val)
288 288
 				if (c->on_change_cb){
289 289
 					s.s=c->name;
290 290
 					s.len=strlen(s.s);
291
-					return c->on_change_cb(&tcp_default_cfg, &s, (void*)val);
291
+					return c->on_change_cb(&tcp_default_cfg, NULL, &s, (void*)val);
292 292
 				}
293 293
 			}
294 294
 			return 0;