[sr-dev] git:master: modules_k/statistics: fixed bug when using pvar as stat value ( fixup function was broken)

Jason Penton jason.penton at gmail.com
Fri Jan 18 13:35:58 CET 2013


Module: sip-router
Branch: master
Commit: 3cec800fb8e48b6f2dbc880c5a991e9d636c9f5c
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3cec800fb8e48b6f2dbc880c5a991e9d636c9f5c

Author: Jason Penton <jason.penton at smilecoms.com>
Committer: Jason Penton <jason.penton at smilecoms.com>
Date:   Fri Jan 18 14:33:53 2013 +0200

modules_k/statistics: fixed bug when using pvar as stat value (fixup function was broken)

---

 modules_k/statistics/statistics.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules_k/statistics/statistics.c b/modules_k/statistics/statistics.c
index 045bd02..3940dde 100644
--- a/modules_k/statistics/statistics.c
+++ b/modules_k/statistics/statistics.c
@@ -172,7 +172,7 @@ static int fixup_stat(void** param, int param_no)
 		}
 
 		if (err==0){
-			if (n==0) {
+			if (n==0 && (s.s[0]!='$')) {	//we can't check the value of the pvar so have to ignore this check if it is a pvar
 				LM_ERR("update with 0 has no sense\n");
 				return E_CFG;
 			}




More information about the sr-dev mailing list