diff --git a/device.c b/device.c index 594b22d..372a247 100644 --- a/device.c +++ b/device.c @@ -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 ? diff --git a/statistics.c b/statistics.c index 1e2e7e5..f524c38 100644 --- a/statistics.c +++ b/statistics.c @@ -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 @@ -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;