Browse code

- add -Wold-style-definition to Makefile.defs, to warn about ancient C syntax - fix old definitions in core and default modules (mostly add missing void) - change really old syntax in md5.c - increase devel version

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@2657 689a6050-402a-0410-94f2-e92a70836424

Henning Westerholt authored on 28/08/2007 15:03:09
Showing 76 changed files
... ...
@@ -170,7 +170,7 @@ static str log_attrs[ACC_CORE_LEN+MAX_ACC_EXTRA+MAX_ACC_LEG];
170 170
 		n++; \
171 171
 	} while(0)
172 172
 
173
-void acc_log_init()
173
+void acc_log_init(void)
174 174
 {
175 175
 	struct acc_extra *extra;
176 176
 	int n;
... ...
@@ -268,7 +268,7 @@ static db_key_t db_keys[ACC_CORE_LEN+1+MAX_ACC_EXTRA+MAX_ACC_LEG];
268 268
 static db_val_t db_vals[ACC_CORE_LEN+1+MAX_ACC_EXTRA+MAX_ACC_LEG];
269 269
 
270 270
 
271
-static void acc_db_init_keys()
271
+static void acc_db_init_keys(void)
272 272
 {
273 273
 	struct acc_extra *extra;
274 274
 	int time_idx;
... ...
@@ -341,7 +341,7 @@ int acc_db_init_child(char *db_url)
341 341
 
342 342
 
343 343
 /* close a db connection */
344
-void acc_db_close()
344
+void acc_db_close(void)
345 345
 {
346 346
 	if (db_handle && acc_dbf.close)
347 347
 		acc_dbf.close(db_handle);
... ...
@@ -56,7 +56,7 @@ static char int_buf[INT2STR_MAX_LEN*MAX_ACC_INT_BUF];
56 56
 
57 57
 static char *static_detector = 0;
58 58
 
59
-void init_acc_extra()
59
+void init_acc_extra(void)
60 60
 {
61 61
 	int i;
62 62
 	/* ugly trick to get the address of the static buffer */
... ...
@@ -1329,7 +1329,7 @@ error:
1329 1329
 }
1330 1330
 
1331 1331
 
1332
-int ops_print_avp()
1332
+int ops_print_avp(void)
1333 1333
 {
1334 1334
 	struct usr_avp **avp_list;
1335 1335
 	struct usr_avp *avp;
... ...
@@ -169,7 +169,7 @@ struct module_exports exports = {
169 169
  * mod_init
170 170
  * Called by openser at init time
171 171
  */
172
-static int mod_init() {
172
+static int mod_init(void) {
173 173
 
174 174
 	int ret = 0;
175 175
 
... ...
@@ -226,7 +226,7 @@ void reset_timer(int i)
226 226
 	bm_mycfg->tindex[i]->global_min = 0xffffffff;
227 227
 }
228 228
 
229
-void reset_timers()
229
+void reset_timers(void)
230 230
 {
231 231
 	int i;
232 232
 	if(bm_mycfg==NULL)
... ...
@@ -92,8 +92,8 @@ int fallback_default = 1;
92 92
 
93 93
 /************* Declaration of Interface Functions **************************/
94 94
 static int mod_init(void);
95
-static int child_init();
96
-static int mi_child_init();
95
+static int child_init(int);
96
+static int mi_child_init(void);
97 97
 static void mod_destroy(void);
98 98
 static int route_fixup(void ** param, int param_no);
99 99
 static int user_route_fixup(void ** param, int param_no);
... ...
@@ -301,11 +301,11 @@ static int tree_route_fixup(void ** param, int param_no) {
301 301
 	return 0;
302 302
 }
303 303
 
304
-static int child_init() {
304
+static int child_init(int rank) {
305 305
 	return data_child_init();
306 306
 }
307 307
 
308
-static int mi_child_init() {
308
+static int mi_child_init(void) {
309 309
 	return data_child_init();
310 310
 }
311 311
 
... ...
@@ -71,21 +71,21 @@ int bind_data_loader(const char * source, route_data_load_func_t * api){
71 71
 	return -1;
72 72
 }
73 73
 
74
-int data_main_finalize(){
74
+int data_main_finalize(void){
75 75
 	if(mode == SP_ROUTE_MODE_DB){
76 76
 		main_db_close();
77 77
 	}
78 78
 	return 0;
79 79
 }
80 80
 
81
-int data_child_init(){
81
+int data_child_init(void){
82 82
 	if(mode == SP_ROUTE_MODE_DB){
83 83
 		return db_child_init();
84 84
 	}
85 85
 	return 0;
86 86
 }
87 87
 
88
-void data_destroy(){
88
+void data_destroy(void){
89 89
 	if(mode == SP_ROUTE_MODE_DB){
90 90
 		db_destroy();
91 91
 	}
... ...
@@ -55,10 +55,10 @@ typedef int (*route_data_load_func_t)(struct rewrite_data * rd);
55 55
  */
56 56
 int bind_data_loader(const char * source, route_data_load_func_t * api);
57 57
 
58
-int data_main_finalize();
58
+int data_main_finalize(void);
59 59
 
60
-int data_child_init();
60
+int data_child_init(void);
61 61
 
62
-void data_destroy();
62
+void data_destroy(void);
63 63
 
64 64
 #endif
... ...
@@ -46,13 +46,13 @@
46 46
  *
47 47
  * @return 0 means ok, -1 means an error occured.
48 48
  */
49
-int db_init();
49
+int db_init(void);
50 50
 
51
-void main_db_close();
51
+void main_db_close(void);
52 52
 
53
-int db_child_init();
53
+int db_child_init(void);
54 54
 
55
-void db_destroy();
55
+void db_destroy(void);
56 56
 
57 57
 /**
58 58
  * Loads the routing data from the database given in global
... ...
@@ -294,7 +294,7 @@ static int mod_init(void)
294 294
 }
295 295
 
296 296
 
297
-static void mod_destroy()
297
+static void mod_destroy(void)
298 298
 {
299 299
 	if (probability)
300 300
 		shm_free(probability);
... ...
@@ -106,7 +106,7 @@ static int w_process_register_norpl(struct sip_msg* msg, char* str,char* str2);
106 106
 static int cpl_process_register(struct sip_msg* msg, int no_rpl);
107 107
 static int fixup_cpl_run_script(void** param, int param_no);
108 108
 static int cpl_init(void);
109
-static int mi_child_init();
109
+static int mi_child_init(void);
110 110
 static int cpl_child_init(int rank);
111 111
 static int cpl_exit(void);
112 112
 static void cpl_process(int rank);
... ...
@@ -420,7 +420,7 @@ static int cpl_child_init(int rank)
420 420
 }
421 421
 
422 422
 
423
-static int mi_child_init()
423
+static int mi_child_init(void)
424 424
 {
425 425
 	return cpl_db_init(DB_URL, DB_TABLE);
426 426
 }
... ...
@@ -46,7 +46,7 @@ static gen_lock_t *_cachesem = NULL;
46 46
 /**
47 47
  *
48 48
  */
49
-int dbt_init_cache()
49
+int dbt_init_cache(void)
50 50
 {
51 51
 	if(!_cachesem)
52 52
 	{
... ...
@@ -387,7 +387,7 @@ tbl_cache_p dbt_db_get_table(dbt_cache_p _dc, str *_s)
387 387
 /**
388 388
  *
389 389
  */
390
-int dbt_cache_destroy()
390
+int dbt_cache_destroy(void)
391 391
 {
392 392
 	dbt_cache_p _dc=NULL, _dc0=NULL;
393 393
 	
... ...
@@ -523,7 +523,7 @@ int dbt_db_free(dbt_db_p _dbp)
523 523
 /**
524 524
  *
525 525
  */
526
-tbl_cache_p tbl_cache_new()
526
+tbl_cache_p tbl_cache_new(void)
527 527
 {
528 528
 	tbl_cache_p _tbc = NULL;
529 529
 	_tbc = (tbl_cache_p)shm_malloc(sizeof(tbl_cache_t));
... ...
@@ -63,7 +63,7 @@ MODULE_VERSION
63 63
 
64 64
 static int mod_init(void);
65 65
 static int child_init(int rank);
66
-static void mod_destroy();
66
+static void mod_destroy(void);
67 67
 
68 68
 /* module parameter */
69 69
 static int dlg_hash_size = 4096;
... ...
@@ -354,7 +354,7 @@ static int child_init(int rank)
354 354
 
355 355
 
356 356
 
357
-static void mod_destroy()
357
+static void mod_destroy(void)
358 358
 {
359 359
 	destroy_dlg_db();
360 360
 	destroy_dlg_timer();
... ...
@@ -32,7 +32,7 @@
32 32
 
33 33
 static struct dlg_head_cbl* create_cbs = 0;
34 34
 
35
-int init_dlg_callbacks()
35
+int init_dlg_callbacks(void)
36 36
 {
37 37
 	create_cbs = (struct dlg_head_cbl*)shm_malloc(sizeof(struct dlg_head_cbl));
38 38
 	if (create_cbs==0) {
... ...
@@ -58,7 +58,7 @@ void destroy_dlg_callbacks_list(struct dlg_callback *cb)
58 58
 }
59 59
 
60 60
 
61
-void destroy_dlg_callbacks()
61
+void destroy_dlg_callbacks(void)
62 62
 {
63 63
 	if (create_cbs==0)
64 64
 		return;
... ...
@@ -165,7 +165,7 @@ int init_dlg_db( char *db_url, int dlg_hash_size , int db_update_period)
165 165
 
166 166
 
167 167
 
168
-void destroy_dlg_db()
168
+void destroy_dlg_db(void)
169 169
 {
170 170
 	/*save the dialogs' info*/
171 171
 	if (dialog_db_handle) {
... ...
@@ -177,7 +177,7 @@ void destroy_dlg_db()
177 177
 
178 178
 
179 179
 
180
-static int use_dialog_table()
180
+static int use_dialog_table(void)
181 181
 {
182 182
 	if(!dialog_db_handle){
183 183
 		LOG(L_ERR, "ERROR:dialog:use_dialog_table: invalid database handle\n");
... ...
@@ -104,7 +104,7 @@ void init_dlg_handlers(char *rr_param_p, int dlg_flag_p,
104 104
 }
105 105
 
106 106
 
107
-void destroy_dlg_handlers()
107
+void destroy_dlg_handlers(void)
108 108
 {
109 109
 	shutdown_done = 1;
110 110
 }
... ...
@@ -131,7 +131,7 @@ static inline void destroy_dlg(struct dlg_cell *dlg)
131 131
 
132 132
 
133 133
 
134
-void destroy_dlg_table()
134
+void destroy_dlg_table(void)
135 135
 {
136 136
 	struct dlg_cell *dlg, *l_dlg;
137 137
 	unsigned int i;
... ...
@@ -69,7 +69,7 @@ error0:
69 69
 
70 70
 
71 71
 
72
-void destroy_dlg_timer()
72
+void destroy_dlg_timer(void)
73 73
 {
74 74
 	if (d_timer==0)
75 75
 		return;
... ...
@@ -95,7 +95,7 @@ int *ds_list_nr, *crt_idx, *next_idx;
95 95
 
96 96
 void destroy_list(int);
97 97
 
98
-int init_data()
98
+int init_data(void)
99 99
 {
100 100
 	int * p;
101 101
 
... ...
@@ -342,7 +342,7 @@ error:
342 342
 	return -1;
343 343
 }
344 344
 
345
-int ds_connect_db()
345
+int ds_connect_db(void)
346 346
 {
347 347
 	if(ds_db_url==0)
348 348
 		return -1;
... ...
@@ -360,7 +360,7 @@ int ds_connect_db()
360 360
 	return 0;
361 361
 }
362 362
 
363
-void ds_disconnect_db()
363
+void ds_disconnect_db(void)
364 364
 {
365 365
 								
366 366
 	if(ds_db_handle)
... ...
@@ -371,7 +371,7 @@ void ds_disconnect_db()
371 371
 }
372 372
 
373 373
 /*initialize and verify DB stuff*/
374
-int init_ds_db()
374
+int init_ds_db(void)
375 375
 {
376 376
 	str table;
377 377
 	int ver;
... ...
@@ -419,7 +419,7 @@ int init_ds_db()
419 419
 }
420 420
 
421 421
 /*load groups of destinations from DB*/
422
-int ds_load_db()
422
+int ds_load_db(void)
423 423
 {
424 424
 	int i, id, nr_rows, setn;
425 425
 	str uri;
... ...
@@ -500,7 +500,7 @@ err2:
500 500
 }
501 501
 
502 502
 /*called from dispatcher.c: free all*/
503
-int ds_destroy_list()
503
+int ds_destroy_list(void)
504 504
 {
505 505
 	destroy_list(0);
506 506
 	destroy_list(1);
... ...
@@ -1515,6 +1515,3 @@ void ds_check_timer(unsigned int ticks, void* param)
1515 1515
 		}
1516 1516
 	}
1517 1517
 }
1518
-
1519
-
1520
-
... ...
@@ -108,7 +108,7 @@ static int ds_warn_fixup(void** param, int param_no);
108 108
 struct mi_root* ds_mi_set(struct mi_root* cmd, void* param);
109 109
 struct mi_root* ds_mi_list(struct mi_root* cmd, void* param);
110 110
 struct mi_root* ds_mi_reload(struct mi_root* cmd_tree, void* param);
111
-static int mi_child_init();
111
+static int mi_child_init(void);
112 112
 
113 113
 static cmd_export_t cmds[]={
114 114
 	{"ds_select_dst",    w_ds_select_dst,    2, ds_fixup, REQUEST_ROUTE},
... ...
@@ -299,7 +299,7 @@ static int child_init(int rank)
299 299
 	return 0;
300 300
 }
301 301
 
302
-static int mi_child_init()
302
+static int mi_child_init(void)
303 303
 {
304 304
 	
305 305
 	if(ds_db_url!= NULL)
... ...
@@ -74,7 +74,7 @@ error:
74 74
 }
75 75
 
76 76
 
77
-void domain_db_close()
77
+void domain_db_close(void)
78 78
 {
79 79
 	if (db_handle && domain_dbf.close){
80 80
 		domain_dbf.close(db_handle);
... ...
@@ -50,7 +50,7 @@
50 50
 static int mod_init(void);
51 51
 static void destroy(void);
52 52
 static int child_init(int rank);
53
-static int mi_child_init();
53
+static int mi_child_init(void);
54 54
 static int parameter_fixup(void** param, int param_no);
55 55
 
56 56
 MODULE_VERSION
... ...
@@ -221,7 +221,7 @@ static int child_init(int rank)
221 221
 }
222 222
 
223 223
 
224
-static int mi_child_init()
224
+static int mi_child_init(void)
225 225
 {
226 226
 	return domain_db_init(db_url.s);
227 227
 }
... ...
@@ -224,7 +224,7 @@ error:
224 224
 }
225 225
 
226 226
 
227
-void domainpolicy_db_close()
227
+void domainpolicy_db_close(void)
228 228
 {
229 229
 	if (db_handle && domainpolicy_dbf.close){
230 230
 		domainpolicy_dbf.close(db_handle);
... ...
@@ -54,7 +54,7 @@ inline static int w_exec_avp(struct sip_msg* msg, char* cmd, char* avpl);
54 54
 static int it_list_fixup(void** param, int param_no);
55 55
 static int exec_avp_fixup(void** param, int param_no);
56 56
 
57
-inline static void exec_shutdown();
57
+inline static void exec_shutdown(void);
58 58
 
59 59
 /*
60 60
  * Exported functions
... ...
@@ -97,7 +97,7 @@ struct module_exports exports= {
97 97
 	0               /* per-child init function */
98 98
 };
99 99
 
100
-void exec_shutdown()
100
+void exec_shutdown(void)
101 101
 {
102 102
 	if (time_to_kill) destroy_kill();
103 103
 }
... ...
@@ -133,7 +133,7 @@ int schedule_to_kill( int pid )
133 133
 	return 1;
134 134
 }
135 135
 
136
-int initialize_kill()
136
+int initialize_kill(void)
137 137
 {
138 138
 	/* if disabled ... */
139 139
 	if (time_to_kill==0) return 1;
... ...
@@ -157,7 +157,7 @@ int initialize_kill()
157 157
 	return 1;
158 158
 }
159 159
 
160
-void destroy_kill()
160
+void destroy_kill(void)
161 161
 {
162 162
 	/* if disabled ... */
163 163
 	if (time_to_kill==0) 
... ...
@@ -208,7 +208,7 @@ int group_db_bind(char* db_url)
208 208
 }
209 209
 
210 210
 
211
-void group_db_close()
211
+void group_db_close(void)
212 212
 {
213 213
 	if (group_dbh && group_dbf.close){
214 214
 		group_dbf.close(group_dbh);
... ...
@@ -45,7 +45,7 @@ extern char imc_cmd_start_char;
45 45
 /**
46 46
  * hash thable init
47 47
  */
48
-int imc_htable_init()
48
+int imc_htable_init(void)
49 49
 {
50 50
 	int i;
51 51
 
... ...
@@ -86,7 +86,7 @@ error:
86 86
 /**
87 87
  * destroy hash table
88 88
  */
89
-int imc_htable_destroy()
89
+int imc_htable_destroy(void)
90 90
 {
91 91
 	int i,room_deleted;
92 92
 	imc_room_p irp = NULL, irp_temp=NULL;
... ...
@@ -418,5 +418,3 @@ int imc_del_member(imc_room_p room, str* user, str* domain)
418 418
 	
419 419
 	return 0;
420 420
 }
421
-
422
-
... ...
@@ -366,7 +366,7 @@ int lcr_db_bind(char* db_url)
366 366
 }
367 367
 
368 368
 
369
-void lcr_db_close()
369
+void lcr_db_close(void)
370 370
 {
371 371
 	if (db_handle && lcr_dbf.close){
372 372
 		lcr_dbf.close(db_handle);
... ...
@@ -414,7 +414,7 @@ static int child_init(int rank)
414 414
 }
415 415
 
416 416
 
417
-static int mi_child_init()
417
+static int mi_child_init(void)
418 418
 {
419 419
 	return lcr_db_init(db_url.s);
420 420
 }
... ...
@@ -717,7 +717,7 @@ static int rand_lcrs(const void *m1, const void *m2)
717 717
 /*
718 718
  * regcomp each from_uri.
719 719
  */
720
-int load_from_uri_regex()
720
+int load_from_uri_regex(void)
721 721
 {
722 722
     int i, status, result = 0;
723 723
     
... ...
@@ -162,8 +162,7 @@ static void func_invite(struct cell *t,struct sip_msg *msg,int code,void *param)
162 162
 #endif
163 163
 
164 164
 
165
-int
166
-prepare ()
165
+int prepare (void)
167 166
 {
168 167
 
169 168
 	/* using pre-compiled expressions to speed things up*/
... ...
@@ -186,8 +185,7 @@ prepare ()
186 185
 
187 186
 
188 187
 
189
-static int
190
-mod_init (void)
188
+static int mod_init (void)
191 189
 {
192 190
 	ipExpression = NULL;
193 191
 	portExpression = NULL;
... ...
@@ -200,8 +198,7 @@ mod_init (void)
200 198
 }
201 199
 
202 200
 
203
-static void
204
-destroy (void)
201
+static void destroy (void)
205 202
 {
206 203
 	/*free some compiled regex expressions */
207 204
 	free_compiled_expresions();	
... ...
@@ -540,7 +540,7 @@ int compile_expresions(char *port,char *ip)
540 540
 	return 0;
541 541
 }
542 542
 
543
-int free_compiled_expresions()
543
+int free_compiled_expresions(void)
544 544
 {
545 545
 	if (portExpression != NULL) 
546 546
 		{
... ...
@@ -172,7 +172,7 @@ err_rx:
172 172
 
173 173
 
174 174
 
175
-int mi_init_datagram_buffer(){
175
+int mi_init_datagram_buffer(void){
176 176
 
177 177
 	mi_buf = pkg_malloc(DATAGRAM_SOCK_BUF_SIZE);
178 178
 	if ( mi_buf==NULL) {
... ...
@@ -73,8 +73,8 @@
73 73
 static int mi_mod_init(void);
74 74
 static int mi_child_init(int rank);
75 75
 static int mi_destroy(void);
76
-static int pre_datagram_process();
77
-static int post_datagram_process();
76
+static int pre_datagram_process(void);
77
+static int post_datagram_process(void);
78 78
 static void datagram_process(int rank);
79 79
 
80 80
 /* local variables */
... ...
@@ -281,7 +281,7 @@ static int mi_child_init(int rank)
281 281
 }
282 282
 
283 283
 
284
-static int pre_datagram_process()
284
+static int pre_datagram_process(void)
285 285
 {
286 286
 	int res;
287 287
 
... ...
@@ -330,7 +330,7 @@ static void datagram_process(int rank)
330 330
 }
331 331
 
332 332
 
333
-static int post_datagram_process()
333
+static int post_datagram_process(void)
334 334
 {
335 335
 	/* close the sockets */
336 336
 	close(sockets.rx_sock);
... ...
@@ -365,5 +365,3 @@ error:
365 365
 	return -1;
366 366
 
367 367
 }
368
-
369
-
... ...
@@ -39,7 +39,7 @@
39 39
 /**
40 40
  * create a new element
41 41
  */
42
-msg_list_el msg_list_el_new()
42
+msg_list_el msg_list_el_new(void)
43 43
 {
44 44
 	msg_list_el mle = NULL;
45 45
 	mle = (msg_list_el)shm_malloc(sizeof(t_msg_list_el));
... ...
@@ -85,7 +85,7 @@ void msg_list_el_free_all(msg_list_el mle)
85 85
 /**
86 86
  * init a list
87 87
  */
88
-msg_list msg_list_init()
88
+msg_list msg_list_init(void)
89 89
 {
90 90
 	msg_list ml = NULL;
91 91
 	
... ...
@@ -1876,8 +1876,7 @@ alter_mediaport(struct sip_msg *msg, str *body, str *oldport, str *newport,
1876 1876
 	return 0;
1877 1877
 }
1878 1878
 
1879
-static char *
1880
-gencookie()
1879
+static char * gencookie(void)
1881 1880
 {
1882 1881
 	static char cook[34];
1883 1882
 
... ...
@@ -60,7 +60,7 @@ static str  sipping_method = {"OPTIONS",7};
60 60
 
61 61
 
62 62
 
63
-static void init_sip_ping()
63
+static void init_sip_ping(void)
64 64
 {
65 65
 	int len;
66 66
 	char *p;
... ...
@@ -93,7 +93,7 @@ static int  w_prefix2domain_1(struct sip_msg* msg, char* mode, char* str2);
93 93
 static int  w_prefix2domain_2(struct sip_msg* msg, char* mode, char* sd_en);
94 94
 static int  mod_init(void);
95 95
 static void mod_destroy(void);
96
-static int  child_init();
96
+static int  child_init(void);
97 97
 static int  mod_child_init(int r);
98 98
 
99 99
 static int prefix2domain(struct sip_msg*, int mode, int sd_en);
... ...
@@ -266,7 +266,7 @@ error1:
266 266
 }
267 267
 
268 268
 
269
-static int child_init()
269
+static int child_init(void)
270 270
 {
271 271
 	db_con = pdt_dbf.init(db_url);
272 272
 	if(db_con==NULL)
... ...
@@ -551,7 +551,7 @@ int update_new_uri(struct sip_msg *msg, int plen, str *d, int mode)
551 551
 	return 0;
552 552
 }
553 553
 
554
-int pdt_load_db()
554
+int pdt_load_db(void)
555 555
 {
556 556
 	db_key_t db_cols[3] = {sdomain_column, prefix_column, domain_column};
557 557
 	str p, d, sdomain;
... ...
@@ -298,7 +298,7 @@ error:
298 298
 /*
299 299
  * Open database connection if necessary
300 300
  */
301
-int mi_init_addresses()
301
+int mi_init_addresses(void)
302 302
 {
303 303
     if (!db_url || db_handle) return 0;
304 304
     db_handle = perm_dbf.init(db_url);
... ...
@@ -3,7 +3,7 @@
3 3
  *
4 4
  * PERMISSIONS module
5 5
  *
6
- * Copyright (C) 2003 Mikl�s Tirp�k (mtirpak@sztaki.hu)
6
+ * Copyright (C) 2003 Miklós Tirpák (mtirpak@sztaki.hu)
7 7
  * Copyright (C) 2003 iptel.org
8 8
  * Copyright (C) 2003-2007 Juha Heinanen
9 9
  *
... ...
@@ -737,13 +737,13 @@ static int child_init(int rank)
737 737
 }
738 738
 
739 739
 
740
-static int mi_trusted_child_init()
740
+static int mi_trusted_child_init(void)
741 741
 {
742 742
     return mi_init_trusted();
743 743
 }
744 744
 
745 745
 
746
-static int mi_addr_child_init()
746
+static int mi_addr_child_init(void)
747 747
 {
748 748
     return mi_init_addresses();
749 749
 }
... ...
@@ -288,7 +288,7 @@ int init_child_trusted(int rank)
288 288
 /*
289 289
  * Open database connection if necessary
290 290
  */
291
-int mi_init_trusted()
291
+int mi_init_trusted(void)
292 292
 {
293 293
     if (!db_url || db_handle) return 0;
294 294
     db_handle = perm_dbf.init(db_url);
... ...
@@ -169,7 +169,7 @@ static inline void destroy_ip_node(struct ip_node *node)
169 169
 
170 170
 
171 171
 /* destroy and free the IP tree */
172
-void destroy_ip_tree()
172
+void destroy_ip_tree(void)
173 173
 {
174 174
 	int i;
175 175
 
... ...
@@ -33,7 +33,7 @@ struct rr_callback* rrcb_hl = 0;  /* head list */
33 33
 
34 34
 
35 35
 
36
-void destroy_rrcb_lists()
36
+void destroy_rrcb_lists(void)
37 37
 {
38 38
 	struct rr_callback *cbp, *cbp_tmp;
39 39
 
... ...
@@ -154,7 +154,7 @@ static int mod_init(void)
154 154
 }
155 155
 
156 156
 
157
-static void mod_destroy()
157
+static void mod_destroy(void)
158 158
 {
159 159
 	destroy_rrcb_lists();
160 160
 }
... ...
@@ -46,7 +46,7 @@ char *cluster_cfg;
46 46
  * -1 if config is malformed (unable to parse);
47 47
  *  1 if config is successfully set
48 48
  */
49
-int parse_cluster_cfg()
49
+int parse_cluster_cfg(void)
50 50
 {
51 51
    char *p,*start;
52 52
    int n,k;
... ...
@@ -83,7 +83,7 @@ static int open_server_sockets(struct ip_addr *address,unsigned short port,int *
83 83
 /** Main loop for the Event Dispatcher process.
84 84
  * 
85 85
  */
86
-int dispatcher_main_loop()
86
+int dispatcher_main_loop(void)
87 87
 {
88 88
    struct pollfd poll_fds[3+MAX_AS_NR],*poll_tmp;
89 89
    int clean_index,i,j,k,fd,poll_events=0,socks[2],chld_status;
... ...
@@ -409,7 +409,7 @@ union helper{
409 409
  * which are not related to any transaction (finish event, or error event...)
410 410
  * we should separate event-specific handling in different functions...
411 411
  */
412
-static int dispatch_relay()
412
+static int dispatch_relay(void)
413 413
 {
414 414
    int i,j,retval,tries;
415 415
    union helper thepointer;
... ...
@@ -52,7 +52,7 @@ static inline int send_ping(struct as_entry *the_as,struct timeval *now);
52 52
  * 1 if High Availability
53 53
  * -1 if config error
54 54
  */
55
-int prepare_ha()
55
+int prepare_ha(void)
56 56
 {
57 57
    use_ha=0;
58 58
    if(!(jain_ping_config || servlet_ping_config)){
... ...
@@ -165,7 +165,7 @@ static inline int parse_ping(char * string,int *ping_period,int *pings_lost,int
165 165
  * returns:
166 166
  * 	-1 on error;
167 167
  */
168
-int spawn_pinger()
168
+int spawn_pinger(void)
169 169
 {
170 170
    int n,next_jain,next_servlet,timeout;
171 171
    struct timeval now,last_jain,last_servlet;
... ...
@@ -684,7 +684,7 @@ error:
684 684
 
685 685
 /**Initializes SEAS to-tags
686 686
 */
687
-static void seas_init_tags()
687
+static void seas_init_tags(void)
688 688
 {
689 689
    init_tags(seas_tags, &seas_tag_suffix,"VozTele-Seas/tags",'-');
690 690
    LOG(L_DBG,"seas_init_tags, seas_tags=%s\n",seas_tags);
... ...
@@ -726,7 +726,7 @@ static int seas_child_init(int rank)
726 726
  * send them an EOF event or something that signals that SER is beeing shutdown,
727 727
  * so they could do their cleanup, etc.
728 728
  */
729
-static int seas_exit()
729
+static int seas_exit(void)
730 730
 {
731 731
    if(seas_listen_ip!=&(get_first_socket()->address))
732 732
       pkg_free(seas_listen_ip);
... ...
@@ -84,7 +84,7 @@ int process_pong(struct ha *the_table,unsigned int seqno);
84 84
 int print_local_uri(as_p as,char processor_id,char *where,int len);
85 85
 
86 86
 
87
-int dispatch_actions()
87
+int dispatch_actions(void)
88 88
 {
89 89
    int fd,n,ret,timeout,elapsed_ms;
90 90
    static int ktimeout;
... ...
@@ -61,7 +61,7 @@ static void sig_handler(int signo)
61 61
    LOG(L_WARN,"Statistics process:caught signal (%d)\n",signo);
62 62
 }
63 63
 
64
-struct statstable* init_seas_stats_table()
64
+struct statstable* init_seas_stats_table(void)
65 65
 {
66 66
    /*allocs the table*/
67 67
    seas_stats_table= (struct statstable*)shm_malloc( sizeof( struct statstable ) );
... ...
@@ -79,7 +79,7 @@ struct statstable* init_seas_stats_table()
79 79
    return seas_stats_table;
80 80
 }
81 81
 
82
-inline void destroy_seas_stats_table()
82
+inline void destroy_seas_stats_table(void)
83 83
 {
84 84
    /*deallocs the table*/
85 85
    if(seas_stats_table){
... ...
@@ -299,7 +299,7 @@ error:
299 299
  * 1 if stats properly started
300 300
  * -1 if error
301 301
  */
302
-inline int stop_stats_server()
302
+inline int stop_stats_server(void)
303 303
 {
304 304
    if(pid)
305 305
       kill(SIGTERM,pid);
... ...
@@ -436,7 +436,7 @@ error:/*mutex is locked*/
436 436
    return -1;
437 437
 }
438 438
 
439
-inline void stats_reply()
439
+inline void stats_reply(void)
440 440
 {
441 441
    lock_get(seas_stats_table->mutex);
442 442
    seas_stats_table->received_replies++;
... ...
@@ -84,7 +84,7 @@ int   trace_on      = 0;
84 84
 str    dup_uri_str      = {0, 0};
85 85
 struct sip_uri *dup_uri = 0;
86 86
 
87
-int   *trace_on_flag = NULL;      
87
+int   *trace_on_flag = NULL;
88 88
 
89 89
 static unsigned short traced_user_avp_type;
90 90
 static int_str traced_user_avp;
... ...
@@ -325,7 +325,7 @@ static void destroy(void)
325 325
 		shm_free(trace_on_flag);
326 326
 }
327 327
 
328
-static inline char* siptrace_get_table()
328
+static inline char* siptrace_get_table(void)
329 329
 {
330 330
 	int_str        avp_value;
331 331
 	struct usr_avp *avp;
... ...
@@ -54,7 +54,7 @@ static int w_sl_send_reply(struct sip_msg* msg, char* str1, char* str2);
54 54
 static int w_sl_reply_error(struct sip_msg* msg, char* str1, char* str2);
55 55
 static int fixup_sl_send_reply(void** param, int param_no);
56 56
 static int mod_init(void);
57
-static void mod_destroy();
57
+static void mod_destroy(void);
58 58
 /* module parameter */
59 59
 int sl_enable_stats = 1;
60 60
 
... ...
@@ -156,7 +156,7 @@ static int mod_init(void)
156 156
 
157 157
 
158 158
 
159
-static void mod_destroy()
159
+static void mod_destroy(void)
160 160
 {
161 161
 	sl_shutdown();
162 162
 	destroy_slcb_lists();
... ...
@@ -33,7 +33,7 @@ struct sl_callback* slcb_hl = 0;  /* head list */
33 33
 
34 34
 
35 35
 
36
-void destroy_slcb_lists()
36
+void destroy_slcb_lists(void)
37 37
 {
38 38
 	struct sl_callback *cbp, *cbp_tmp;
39 39
 
... ...
@@ -69,7 +69,7 @@ static char           *tag_suffix;
69 69
    we do not filter */
70 70
 static unsigned int  *sl_timeout = 0;
71 71
 
72
-int sl_startup()
72
+int sl_startup(void)
73 73
 {
74 74
 
75 75
 	init_tags( sl_tag.s, &tag_suffix,
... ...
@@ -89,7 +89,7 @@ int sl_startup()
89 89
 }
90 90
 
91 91
 
92
-int sl_shutdown()
92
+int sl_shutdown(void)
93 93
 {
94 94
 	if (sl_timeout)
95 95
 		shm_free(sl_timeout);
... ...
@@ -283,7 +283,7 @@ error:
283 283
 
284 284
 
285 285
 
286
-int parse_config_lines()
286
+int parse_config_lines(void)
287 287
 {
288 288
 	char *p,*start;
289 289
 	int  i, k, step;
... ...
@@ -521,7 +521,7 @@ error:
521 521
 
522 522
 
523 523
 
524
-int global_init()
524
+int global_init(void)
525 525
 {
526 526
 	int   i, net_pipe[2], foo;
527 527
 	char  *p;
... ...
@@ -63,7 +63,7 @@ static time_t get_time_sys(void)
63 63
 }
64 64
 /* detects if the ser time function get_ticks works, and depending of that
65 65
    sets the correct time function to be used */
66
-void set_gettime_function()
66
+void set_gettime_function(void)
67 67
 {
68 68
 	unsigned int t1,t2;
69 69
 
... ...
@@ -98,7 +98,7 @@ inline void free_report_cell(struct report_cell *cell)
98 98
 
99 99
 
100 100
 
101
-int init_report_queue()
101
+int init_report_queue(void)
102 102
 {
103 103
 	report_queue = (struct report_cell*)
104 104
 		shm_malloc(NR_CELLS*sizeof(struct report_cell));
... ...
@@ -113,7 +113,7 @@ int init_report_queue()
113 113
 
114 114
 
115 115
 
116
-void destroy_report_queue()
116
+void destroy_report_queue(void)
117 117
 {
118 118
 	int i;
119 119
 
... ...
@@ -194,7 +194,7 @@ done:
194 194
 
195 195
 
196 196
 
197
-void check_timeout_in_report_queue()
197
+void check_timeout_in_report_queue(void)
198 198
 {
199 199
 	int i;
200 200
 	time_t current_time;
... ...
@@ -275,7 +275,7 @@ static int mod_child_init(int rank)
275 275
 
276 276
 /* This function is called when OpenSER is shutting down. When this happens, we
277 277
  * log a useful message and kill the AgentX Sub-Agent child process */
278
-static void mod_destroy() 
278
+static void mod_destroy(void) 
279 279
 {
280 280
 	LOG(L_INFO, "INFO: SNMPStats: The SNMPStats module got the kill "
281 281
 			"signal\n");
... ...
@@ -86,7 +86,7 @@ static int  mod_child_init(int rank);
86 86
 
87 87
 /* This function is called when OpenSER is shutting down.  When this happens, we
88 88
  * log a useful message and kill the AgentX Sub-Agent child process */
89
-static void mod_destroy();
89
+static void mod_destroy(void);
90 90
 
91 91
 
92 92
 static proc_export_t mod_procs[] = {
... ...
@@ -85,7 +85,7 @@ static int reg_param_stat( modparam_t type, void* val)
85 85
 
86 86
 
87 87
 
88
-static int mod_init()
88
+static int mod_init(void)
89 89
 {
90 90
 	LOG(L_INFO,"Statistics module - initializing\n");
91 91
 
... ...
@@ -92,7 +92,7 @@ error:
92 92
 
93 93
 
94 94
 
95
-int register_all_mod_stats()
95
+int register_all_mod_stats(void)
96 96
 {
97 97
 	stat_var  *stat;
98 98
 	stat_elem *se;
... ...
@@ -65,7 +65,7 @@ static struct s_table*  tm_table;
65 65
 int syn_branch = 1;
66 66
 
67 67
 
68
-void reset_kr()
68
+void reset_kr(void)
69 69
 {
70 70
 	kr = 0;
71 71
 }
... ...
@@ -76,7 +76,7 @@ void set_kr( enum kill_reason _kr )
76 76
 }
77 77
 
78 78
 
79
-enum kill_reason get_kr() {
79
+enum kill_reason get_kr(void) {
80 80
 	return kr;
81 81
 }
82 82
 
... ...
@@ -93,7 +93,7 @@ void unlock_hash(int i)
93 93
 }
94 94
 
95 95
 
96
-struct s_table* get_tm_table()
96
+struct s_table* get_tm_table(void)
97 97
 {
98 98
 	return tm_table;
99 99
 }
... ...
@@ -328,7 +328,7 @@ error:
328 328
 
329 329
 /* Release all the data contained by the hash table. All the aux. structures
330 330
  *  as sems, lists, etc, are also released */
331
-void free_hash_table(  )
331
+void free_hash_table(void)
332 332
 {
333 333
 	struct cell* p_cell;
334 334
 	struct cell* tmp_cell;
... ...
@@ -355,7 +355,7 @@ void free_hash_table(  )
355 355
 
356 356
 /*
357 357
  */
358
-struct s_table* init_hash_table()
358
+struct s_table* init_hash_table(void)
359 359
 {
360 360
 	int              i;
361 361
 
... ...
@@ -77,7 +77,7 @@ static ser_lock_t* timer_group_lock=0; /* pointer to a TG_NR lock array,
77 77
 
78 78
 /* initialize the locks; return 0 on success, -1 otherwise
79 79
 */
80
-int lock_initialize()
80
+int lock_initialize(void)
81 81
 {
82 82
 	int i;
83 83
 #ifndef GEN_LOCK_T_PREFERED
... ...
@@ -190,7 +190,7 @@ error:
190 190
 
191 191
 
192 192
 #ifdef GEN_LOCK_T_PREFERED
193
-void lock_cleanup()
193
+void lock_cleanup(void)
194 194
 {
195 195
 	/* must check if someone uses them, for now just leave them allocated*/
196 196
 	if (timer_group_lock) shm_free((void*)timer_group_lock);
... ...
@@ -31,7 +31,7 @@ int t_newdlg( struct sip_msg *msg )
31 31
 	return 0;
32 32
 }
33 33
 
34
-dlg_t t_getdlg() {
34
+dlg_t t_getdlg(void) {
35 35
 	return dlg;
36 36
 }
37 37
 
... ...
@@ -365,7 +365,7 @@ int init_twrite_sock(void)
365 365
 
366 366
 
367 367
 
368
-int init_twrite_lines()
368
+int init_twrite_lines(void)
369 369
 {
370 370
 	int i;
371 371
 
... ...
@@ -89,7 +89,7 @@ int send_pr_buffer( struct retr_buf *rb, void *buf, int len
89 89
 
90 90
 
91 91
 
92
-void tm_shutdown()
92
+void tm_shutdown(void)
93 93
 {
94 94
 
95 95
 	DBG("DEBUG: tm_shutdown : start\n");
... ...
@@ -79,7 +79,7 @@ void t_on_branch( unsigned int go_to )
79 79
 }
80 80
 
81 81
 
82
-unsigned int get_on_branch()
82
+unsigned int get_on_branch(void)
83 83
 {
84 84
 	return goto_on_branch;
85 85
 }
... ...
@@ -275,7 +275,7 @@ error0:
275 275
    and FR must be ticking, whereas the request is "forwarded"
276 276
    using a non-SIP way and will be replied the same way
277 277
 */
278
-int add_blind_uac( /*struct cell *t*/ )
278
+int add_blind_uac(void)  /*struct cell *t*/
279 279
 {
280 280
 	unsigned short branch;
281 281
 	struct cell *t;
... ...
@@ -45,7 +45,7 @@ struct tmcb_head_list tmcb_pending_hl = {0,0};
45 45
 unsigned int tmcb_pending_id = -1;
46 46
 
47 47
 
48
-int init_tmcb_lists()
48
+int init_tmcb_lists(void)
49 49
 {
50 50
 	req_in_tmcb_hl = (struct tmcb_head_list*)shm_malloc
51 51
 		( sizeof(struct tmcb_head_list) );
... ...
@@ -73,7 +73,7 @@ inline static void empty_tmcb_list(struct tmcb_head_list *head)
73 73
 	head->reg_types = 0;
74 74
 }
75 75
 
76
-void destroy_tmcb_lists()
76
+void destroy_tmcb_lists(void)
77 77
 {
78 78
 	if (!req_in_tmcb_hl)
79 79
 		return;
... ...
@@ -148,15 +148,15 @@ static struct cell *cancelled_T;
148 148
 static struct cell *e2eack_T;
149 149
 
150 150
 
151
-struct cell *get_t() { return T; }
151
+struct cell *get_t(void) { return T; }
152 152
 void set_t(struct cell *t) { T=t; }
153
-void init_t() {set_t(T_UNDEFINED);}
153
+void init_t(void) {set_t(T_UNDEFINED);}
154 154
 
155
-struct cell *get_cancelled_t() { return cancelled_T; }
156
-void reset_cancelled_t() { cancelled_T=T_UNDEFINED; }
155
+struct cell *get_cancelled_t(void) { return cancelled_T; }
156
+void reset_cancelled_t(void) { cancelled_T=T_UNDEFINED; }
157 157
 
158
-struct cell *get_e2eack_t() { return e2eack_T; }
159
-void reset_e2eack_t() { e2eack_T=T_UNDEFINED; }
158
+struct cell *get_e2eack_t(void) { return e2eack_T; }
159
+void reset_e2eack_t(void) { e2eack_T=T_UNDEFINED; }
160 160
 
161 161
 
162 162
 
... ...
@@ -110,7 +110,7 @@ static int goto_on_reply=0;
110 110
 
111 111
 
112 112
 /* returns the picked branch */
113
-int t_get_picked_branch()
113
+int t_get_picked_branch(void)
114 114
 {
115 115
 	return picked_branch;
116 116
 }
... ...
@@ -154,16 +154,16 @@ void t_on_reply( unsigned int go_to )
154 154
 }
155 155
 
156 156
 
157
-unsigned int get_on_negative()
157
+unsigned int get_on_negative(void)
158 158
 {
159 159
 	return goto_on_negative;
160 160
 }
161
-unsigned int get_on_reply()
161
+unsigned int get_on_reply(void)
162 162
 {
163 163
 	return goto_on_reply;
164 164
 }
165 165
 
166
-void tm_init_tags()
166
+void tm_init_tags(void)
167 167
 {
168 168
 	init_tags(tm_tags, &tm_tag_suffix, 
169 169
 		"OpenSER-TM/tags", TM_TAG_SEPARATOR );
... ...
@@ -477,13 +477,13 @@ inline static void delete_handler( struct timer_link *dele_tl )
477 477
 
478 478
 /***********************************************************/
479 479
 
480
-struct timer_table *get_timertable()
480
+struct timer_table *get_timertable(void)
481 481
 {
482 482
 	return timertable;
483 483
 }
484 484
 
485 485
 
486
-void unlink_timer_lists()
486
+void unlink_timer_lists(void)
487 487
 {
488 488
 	struct timer_link  *tl, *end, *tmp;
489 489
 	enum lists i;
... ...
@@ -508,7 +508,7 @@ void unlink_timer_lists()
508 508
 
509 509
 
510 510
 
511
-struct timer_table *tm_init_timers()
511
+struct timer_table *tm_init_timers(void)
512 512
 {
513 513
 	enum lists i;
514 514
 
... ...
@@ -584,7 +584,7 @@ error0:
584 584
 	return 0;
585 585
 }
586 586
 
587
-void free_timer_table()
587
+void free_timer_table(void)
588 588
 {
589 589
 	enum lists i;
590 590
 
... ...
@@ -73,7 +73,7 @@ static struct uac_credential *crd_list = 0;
73 73
 #define PROXY_AUTH_HDR_LEN  (sizeof(PROXY_AUTH_HDR)-1)
74 74
 
75 75
 
76
-int has_credentials()
76
+int has_credentials(void)
77 77
 {
78 78
 	return (crd_list!=0)?1:0;
79 79
 }
... ...
@@ -185,7 +185,7 @@ error:
185 185
 }
186 186
 
187 187
 
188
-void destroy_credentials()
188
+void destroy_credentials(void)
189 189
 {
190 190
 	struct uac_credential *foo;
191 191
 
... ...
@@ -62,7 +62,7 @@ static void restore_to_reply(struct cell* t, int type, struct tmcb_params *p);
62 62
 #define text3B64_len(_l)   ( ( ((_l)+2)/3 ) << 2 )
63 63
 
64 64
 
65
-void init_from_replacer()
65
+void init_from_replacer(void)
66 66
 {
67 67
 	int i;
68 68
 
... ...
@@ -75,7 +75,7 @@ static int w_uac_auth(struct sip_msg* msg, char* str, char* str2);
75 75
 static int fixup_replace_from1(void** param, int param_no);
76 76
 static int fixup_replace_from2(void** param, int param_no);
77 77
 static int mod_init(void);
78
-static void mod_destroy();
78
+static void mod_destroy(void);
79 79
 
80 80
 
81 81
 /* Exported functions */
... ...
@@ -213,7 +213,7 @@ error:
213 213
 }
214 214
 
215 215
 
216
-static void mod_destroy()
216
+static void mod_destroy(void)
217 217
 {
218 218
 	destroy_credentials();
219 219
 }
... ...
@@ -42,7 +42,7 @@ static int nr_filters[NR_FILTER_TYPES];
42 42
 static int start_filters[NR_FILTER_TYPES];
43 43
 
44 44
 
45
-void init_filters()
45
+void init_filters(void)
46 46
 {
47 47
 	memset( rd_filters , 0, NR_FILTER_TYPES*MAX_FILTERS*sizeof(regex_t*));
48 48
 	reset_filters();
... ...
@@ -55,7 +55,7 @@ void set_default_rule( int type )
55 55
 }
56 56
 
57 57
 
58
-void reset_filters()
58
+void reset_filters(void)
59 59
 {
60 60
 	nr_filters[ACCEPT_FILTER] = 1;
61 61
 	nr_filters[DENY_FILTER]   = 1;
... ...
@@ -281,7 +281,7 @@ int uridb_db_bind(char* db_url)
281 281
 }
282 282
 
283 283
 
284
-void uridb_db_close()
284
+void uridb_db_close(void)
285 285
 {
286 286
 	if (db_handle && uridb_dbf.close){
287 287
 		uridb_dbf.close(db_handle);
... ...
@@ -470,7 +470,7 @@ void print_all_udomains(FILE* _f)
470 470
 
471 471
 
472 472
 /* Loops through all domains summing up the number of users. */
473
-unsigned long get_number_of_users() 
473
+unsigned long get_number_of_users(void)
474 474
 {
475 475
 	int numberOfUsers = 0;
476 476
 
... ...
@@ -31,7 +31,7 @@ gen_lock_set_t* ul_locks=0;
31 31
 /*
32 32
  * Initialize locks
33 33
  */
34
-int ul_init_locks()
34
+int ul_init_locks(void)
35 35
 {
36 36
 	int i;
37 37
 	i = ul_locks_no;
... ...
@@ -58,7 +58,7 @@ int ul_init_locks()
58 58
 	} while (1);
59 59
 }
60 60
 
61
-void ul_destroy_locks()
61
+void ul_destroy_locks(void)
62 62
 {
63 63
 	if (ul_locks !=0){
64 64
 		lock_set_destroy(ul_locks);
... ...
@@ -38,7 +38,7 @@ struct ulcb_head_list* ulcb_list = 0;
38 38
 
39 39
 
40 40
 
41
-int init_ulcb_list()
41
+int init_ulcb_list(void)
42 42
 {
43 43
 	ulcb_list = (struct ulcb_head_list*)shm_malloc
44 44
 		( sizeof(struct ulcb_head_list) );
... ...
@@ -52,7 +52,7 @@ int init_ulcb_list()
52 52
 }
53 53
 
54 54
 
55
-void destroy_ulcb_list()
55
+void destroy_ulcb_list(void)
56 56
 {
57 57
 	struct ul_callback *cbp, *cbp_tmp;
58 58
 
... ...
@@ -71,7 +71,7 @@ static int mod_init(void);                          /* Module initialization fun
71 71
 static void destroy(void);                          /* Module destroy function */
72 72
 static void timer(unsigned int ticks, void* param); /* Timer handler */
73 73
 static int child_init(int rank);                    /* Per-child init function */
74
-static int mi_child_init();
74
+static int mi_child_init(void);
75 75
 
76 76
 extern int bind_usrloc(usrloc_api_t* api);
77 77
 extern int ul_locks_no;
... ...
@@ -368,7 +368,7 @@ static int child_init(int _rank)
368 368
 
369 369
 
370 370
 /* */
371
-static int mi_child_init()
371
+static int mi_child_init(void)
372 372
 {
373 373
 	static int done = 0;
374 374