From 2ae58ef8a21fa0334c4f2a8f02c311e37b6a232c Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 29 Sep 2014 10:47:48 -0400 Subject: [PATCH] adapt $rtpstat to new dictionary layout --- debian/patches/sipwise/rtpengine.patch | 28 ++++++++++++-------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/debian/patches/sipwise/rtpengine.patch b/debian/patches/sipwise/rtpengine.patch index 5a014d000..fab00c6a7 100644 --- a/debian/patches/sipwise/rtpengine.patch +++ b/debian/patches/sipwise/rtpengine.patch @@ -2933,7 +2933,7 @@ + --- /dev/null +++ b/modules/rtpengine/rtpengine.c -@@ -0,0 +1,2175 @@ +@@ -0,0 +1,2173 @@ +/* $Id$ + * + * Copyright (C) 2003-2008 Sippy Software, Inc., http://www.sippysoft.com @@ -5054,7 +5054,7 @@ + pv_param_t *param; + pv_value_t *res; + bencode_buffer_t bencbuf; -+ bencode_item_t *dict, *tot, *in, *out; ++ bencode_item_t *dict, *tot, *rtp, *rtcp; + static char buf[256]; + str ret; + @@ -5067,24 +5067,22 @@ + return -1; + + tot = bencode_dictionary_get_expect(dict, "totals", BENCODE_DICTIONARY); -+ in = bencode_dictionary_get_expect(tot, "input", BENCODE_DICTIONARY); -+ in = bencode_dictionary_get_expect(in, "rtp", BENCODE_DICTIONARY); -+ out = bencode_dictionary_get_expect(tot, "output", BENCODE_DICTIONARY); -+ out = bencode_dictionary_get_expect(out, "rtp", BENCODE_DICTIONARY); ++ rtp = bencode_dictionary_get_expect(tot, "RTP", BENCODE_DICTIONARY); ++ rtcp = bencode_dictionary_get_expect(tot, "RTCP", BENCODE_DICTIONARY); + -+ if (!in || !out) ++ if (!rtp || !rtcp) + goto error; + + ret.s = buf; + ret.len = snprintf(buf, sizeof(buf), -+ "Input: %lli bytes, %lli packets, %lli errors; " -+ "Output: %lli bytes, %lli packets, %lli errors", -+ bencode_dictionary_get_integer(in, "bytes", -1), -+ bencode_dictionary_get_integer(in, "packets", -1), -+ bencode_dictionary_get_integer(in, "errors", -1), -+ bencode_dictionary_get_integer(out, "bytes", -1), -+ bencode_dictionary_get_integer(out, "packets", -1), -+ bencode_dictionary_get_integer(out, "errors", -1)); ++ "RTP: %lli bytes, %lli packets, %lli errors; " ++ "RTCP: %lli bytes, %lli packets, %lli errors", ++ bencode_dictionary_get_integer(rtp, "bytes", -1), ++ bencode_dictionary_get_integer(rtp, "packets", -1), ++ bencode_dictionary_get_integer(rtp, "errors", -1), ++ bencode_dictionary_get_integer(rtcp, "bytes", -1), ++ bencode_dictionary_get_integer(rtcp, "packets", -1), ++ bencode_dictionary_get_integer(rtcp, "errors", -1)); + + bencode_buffer_free(&bencbuf); + return pv_get_strval(msg, param, res, &ret);