Added missing linefeeds into pid/filter statistics.

This commit is contained in:
Rolf Ahrenberg 2007-10-08 12:30:53 +00:00
parent e4730e4e66
commit 2fae82e107
2 changed files with 7 additions and 2 deletions

View File

@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: device.c,v 1.57 2007/10/07 22:54:09 rahrenbe Exp $
* $Id: device.c,v 1.58 2007/10/08 12:30:53 rahrenbe Exp $
*/
#include "common.h"
@ -106,6 +106,9 @@ cString cIptvDevice::GetInformation()
*secfilters[i]->GetStatistic(),
((i + 1) % 2) ? '\t' : '\n');
}
// make sure it ends with linefeed
if (!endswith(*filterInfo, "\n"))
filterInfo = cString::sprintf("%s%c", *filterInfo, '\n');
// generate information string
return cString::sprintf("IPTV device #%d (CardIndex: %d)\nSource: %s\n%s\n%s%s",
deviceIndex, CardIndex(), pIptvStreamer ?

View File

@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: statistics.c,v 1.11 2007/10/08 12:25:30 rahrenbe Exp $
* $Id: statistics.c,v 1.12 2007/10/08 12:30:53 rahrenbe Exp $
*/
#include <limits.h>
@ -88,6 +88,8 @@ cString cIptvDeviceStatistics::GetStatistic()
(long)(mostActivePids[i].DataAmount / divider),
unit, ((i + 1) % 2) ? '\t' : '\n');
}
if (!endswith(*info, "\n"))
info = cString::sprintf("%s%c", *info, '\n');
dataBytes = 0;
memset(&mostActivePids, '\0', sizeof(mostActivePids));
return info;