Fix bad reports in "sip show channelstats".

Not directly mergeable in svn trunk, needs more tests, therefore committed directly to 1.6.2.
(closes issue #15819)
Reported by: klaus3000
Patches: 
      asterisk-1.6.2-beta4-sipshowchannelstats-patch-0.2.txt uploaded by klaus3000 (license 65)
Tested by: klaus3000, oej



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@215887 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.6.2
Olle Johansson 17 years ago
parent 0f24984f74
commit c73b17515c

@ -15366,12 +15366,12 @@ static int show_chanstats_cb(void *__cur, void *__arg, int flags)
rxcount > (unsigned int) 100000 ? (unsigned int) (rxcount)/(unsigned int) 1000 : rxcount,
rxcount > (unsigned int) 100000 ? "K":" ",
ast_rtp_get_qosvalue(cur->rtp, AST_RTP_RXPLOSS),
rxcount > ast_rtp_get_qosvalue(cur->rtp, AST_RTP_RXPLOSS) ? (unsigned int) (ast_rtp_get_qosvalue(cur->rtp, AST_RTP_RXPLOSS) / rxcount * 100) : 0,
rxcount > ast_rtp_get_qosvalue(cur->rtp, AST_RTP_RXPLOSS) ? (unsigned int) ((double) ast_rtp_get_qosvalue(cur->rtp, AST_RTP_RXPLOSS) / (ast_rtp_get_qosvalue(cur->rtp, AST_RTP_RXPLOSS) + rxcount) * 100) : 0,
ast_rtp_get_qosvalue(cur->rtp, AST_RTP_RXJITTER),
txcount > (unsigned int) 100000 ? (unsigned int) (txcount)/(unsigned int) 1000 : txcount,
txcount > (unsigned int) 100000 ? "K":" ",
ast_rtp_get_qosvalue(cur->rtp, AST_RTP_TXPLOSS),
txcount > ast_rtp_get_qosvalue(cur->rtp, AST_RTP_TXPLOSS) ? (unsigned int) (ast_rtp_get_qosvalue(cur->rtp, AST_RTP_TXPLOSS)/ txcount * 100) : 0,
txcount > ast_rtp_get_qosvalue(cur->rtp, AST_RTP_TXPLOSS) ? (unsigned int) ((double) ast_rtp_get_qosvalue(cur->rtp, AST_RTP_TXPLOSS)/ txcount * 100) : 0,
ast_rtp_get_qosvalue(cur->rtp, AST_RTP_TXJITTER)
);
arg->numchans++;

@ -2768,7 +2768,7 @@ unsigned int ast_rtp_get_qosvalue(struct ast_rtp *rtp, enum ast_rtp_qos_vars val
case AST_RTP_RXCOUNT:
return (unsigned int) rtp->rxcount;
case AST_RTP_TXJITTER:
return (unsigned int) (rtp->rxjitter * 100.0);
return (unsigned int) (rtp->rxjitter * 1000.0);
case AST_RTP_RXJITTER:
return (unsigned int) (rtp->rtcp ? (rtp->rtcp->reported_jitter / (unsigned int) 65536.0) : 0);
case AST_RTP_RXPLOSS:

Loading…
Cancel
Save