From 756a7626edda52c46a83b11d56c4179483b0cdf5 Mon Sep 17 00:00:00 2001 From: Rolf Ahrenberg Date: Sun, 16 Sep 2007 13:44:09 +0000 Subject: [PATCH] Fixed sscanf() return values. --- device.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/device.c b/device.c index c6424bf..8d864b9 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.20 2007/09/16 13:38:20 rahrenbe Exp $ + * $Id: device.c,v 1.21 2007/09/16 13:44:09 rahrenbe Exp $ */ #include "common.h" @@ -79,19 +79,19 @@ cString cIptvDevice::GetChannelSettings(const char *Param, int *IpPort, cIptvPro { debug("cIptvDevice::GetChannelSettings(%d)\n", deviceIndex); char *loc = NULL; - if (sscanf(Param, "IPTV|UDP|%a[^|]|%u", &loc, IpPort) == 5) { + if (sscanf(Param, "IPTV|UDP|%a[^|]|%u", &loc, IpPort) == 2) { cString addr(loc, true); free(loc); *Protocol = pUdpProtocol; return addr; } - else if (sscanf(Param, "IPTV|HTTP|%a[^|]|%u", &loc, IpPort) == 5) { + else if (sscanf(Param, "IPTV|HTTP|%a[^|]|%u", &loc, IpPort) == 2) { cString addr(loc, true); free(loc); *Protocol = pHttpProtocol; return addr; } - else if (sscanf(Param, "IPTV|FILE|%a[^|]|%u", &loc, IpPort) == 5) { + else if (sscanf(Param, "IPTV|FILE|%a[^|]|%u", &loc, IpPort) == 2) { cString addr(loc, true); free(loc); *Protocol = pFileProtocol;