From fee2f1b701c5d454caf2e1ade91f75d7d234087a Mon Sep 17 00:00:00 2001 From: Arnaldo Pereira Date: Wed, 17 Nov 2010 14:36:31 -0200 Subject: [PATCH] freetdm: removed empty stats from ftmod_r2 and fixed strsep() definition warning. --- libs/freetdm/src/ftmod/ftmod_r2/ftmod_r2.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/libs/freetdm/src/ftmod/ftmod_r2/ftmod_r2.c b/libs/freetdm/src/ftmod/ftmod_r2/ftmod_r2.c index dd2dc1fa05..d5344814f0 100644 --- a/libs/freetdm/src/ftmod/ftmod_r2/ftmod_r2.c +++ b/libs/freetdm/src/ftmod/ftmod_r2/ftmod_r2.c @@ -31,11 +31,15 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #ifdef __linux__ +#ifndef _BSD_SOURCE +#define _BSD_SOURCE /* for strsep() */ +#endif #include #include +#include #endif +#include #include #include "freetdm.h" #include "private/ftdm_core.h" @@ -1607,22 +1611,13 @@ static FIO_API_FUNCTION(ftdm_r2_api) r2data->loops, r2data->monitor_thread_id); stream->write_function(stream, "\n"); - stream->write_function(stream, "%4s %-12.12s %-12.12s %6s %6s %6s %6s\n", "Channel", "Tx CAS", "Rx CAS", - "Rx Avg", "Tx Avg", "Rx", "Tx"); + stream->write_function(stream, "%4s %-12.12s %-12.12s\n", "Channel", "Tx CAS", "Rx CAS"); for (i = 1; i <= span->chan_count; i++) { - char rx_str[25]; - char tx_str[25]; - char rxavg_str[25]; - char txavg_str[25]; r2chan = R2CALL(span->channels[i])->r2chan; - stream->write_function(stream, "%4d %-12.12s %-12.12s %6s %6s %6s %6s\n", + stream->write_function(stream, "%4d %-12.12s %-12.12s\n", span->channels[i]->chan_id, openr2_chan_get_tx_cas_string(r2chan), - openr2_chan_get_rx_cas_string(r2chan), - rxavg_str, - txavg_str, - rx_str, - tx_str); + openr2_chan_get_rx_cas_string(r2chan)); } stream->write_function(stream, "\n"); stream->write_function(stream, "+OK.\n");