[asterisk-bugs] [Asterisk 0015819]: [patch] buggy output in "sip show channelstats"

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Sep 7 05:58:50 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15819 
====================================================================== 
Reported By:                klaus3000
Assigned To:                oej
====================================================================== 
Project:                    Asterisk
Issue ID:                   15819
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     acknowledged
Asterisk Version:           1.6.2.0-beta4 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-09-02 12:09 CDT
Last Modified:              2009-09-07 05:58 CDT
====================================================================== 
Summary:                    [patch] buggy output in "sip show channelstats"
Description: 
Hi!

"sip show channelstats" output is wrong
- the packetloss in % is always 0 due to integer division instead of float
divison
- the local measured jitter is reported in as rxjitter (which in in
seconds) * 100, converted to int. Multiply with 100 makes no sense - I
supsect a type and it should be 1000 as all other jittervalues (max/min...)
are also multiplyed with 1000.
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0015807 rtt should be stored as double in struc...
====================================================================== 

---------------------------------------------------------------------- 
 (0110274) oej (manager) - 2009-09-07 05:58
 https://issues.asterisk.org/view.php?id=15819#c110274 
---------------------------------------------------------------------- 
I wonder about those memsets() 

The ast_calloc should be initialized. It's a wrapper around calloc. The
man page says
"The calloc() function contiguously allocates enough space for count
objects that are size
     bytes of memory each and returns a pointer to the allocated memory. 
The allocated memory
     is filled with bytes of value zero.
"
So it doesn't really make sense to call memset after the ast_calloc.
Wonder what's going on here, since I belive you believe it did solve an
issue? 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-09-07 05:58 oej            Note Added: 0110274                          
======================================================================




More information about the asterisk-bugs mailing list