Module: kamailio Branch: master Commit: de415fd7116498bcbab5badad677a74d1313ab6b URL: https://github.com/kamailio/kamailio/commit/de415fd7116498bcbab5badad677a74d1313ab6b
Author: Daniel-Constantin Mierla <[email protected]> Committer: Daniel-Constantin Mierla <[email protected]> Date: 2015-09-22T23:45:34+02:00 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 --- Modified: modules/tsilo/ts_hash.h Modified: modules/tsilo/tsilo.c --- Diff: https://github.com/kamailio/kamailio/commit/de415fd7116498bcbab5badad677a74d1313ab6b.diff Patch: https://github.com/kamailio/kamailio/commit/de415fd7116498bcbab5badad677a74d1313ab6b.patch --- diff --git a/modules/tsilo/ts_hash.h b/modules/tsilo/ts_hash.h index c406f57..4dc1f8f 100644 --- a/modules/tsilo/ts_hash.h +++ b/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 { diff --git a/modules/tsilo/tsilo.c b/modules/tsilo/tsilo.c index fe475c6..843804c 100644 --- a/modules/tsilo/tsilo.c +++ b/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, _______________________________________________ sr-dev mailing list [email protected] http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
