Browse Source

tsilo: define the stats in .c file and extern in .h file

- the .h can be included in many .c files, resulting in multiple
  declarations of the stats
Daniel-Constantin Mierla 10 years ago
parent
commit
de415fd711
2 changed files with 10 additions and 10 deletions
  1. 5 5
      modules/tsilo/ts_hash.h
  2. 5 5
      modules/tsilo/tsilo.c

+ 5 - 5
modules/tsilo/ts_hash.h

@@ -36,11 +36,11 @@
 #define MAX_TS_LOCKS  2048
 #define MIN_TS_LOCKS  2
 
-stat_var *stored_ruris;
-stat_var *stored_transactions;
-stat_var *total_ruris;
-stat_var *total_transactions;
-stat_var *added_branches;
+extern stat_var *stored_ruris;
+extern stat_var *stored_transactions;
+extern stat_var *total_ruris;
+extern stat_var *total_transactions;
+extern stat_var *added_branches;
 
 typedef struct ts_transaction
 {

+ 5 - 5
modules/tsilo/tsilo.c

@@ -69,11 +69,11 @@ static int fixup_ts_append(void** param, int param_no);
 static int w_ts_store(struct sip_msg* msg, char *p1, char *p2);
 static int w_ts_store1(struct sip_msg* msg, char *_ruri, char *p2);
 
-extern stat_var *stored_ruris;
-extern stat_var *stored_transactions;
-extern stat_var *total_ruris;
-extern stat_var *total_transactions;
-extern stat_var *added_branches;
+stat_var *stored_ruris;
+stat_var *stored_transactions;
+stat_var *total_ruris;
+stat_var *total_transactions;
+stat_var *added_branches;
 
 static cmd_export_t cmds[]={
 	{"ts_append_to", (cmd_function)w_ts_append_to,  3,