mirror of
https://github.com/rofafor/vdr-plugin-iptv.git
synced 2023-10-10 13:37:03 +02:00
Fixed sscanf() return values.
This commit is contained in:
parent
b6aabba854
commit
756a7626ed
8
device.c
8
device.c
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* 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"
|
#include "common.h"
|
||||||
@ -79,19 +79,19 @@ cString cIptvDevice::GetChannelSettings(const char *Param, int *IpPort, cIptvPro
|
|||||||
{
|
{
|
||||||
debug("cIptvDevice::GetChannelSettings(%d)\n", deviceIndex);
|
debug("cIptvDevice::GetChannelSettings(%d)\n", deviceIndex);
|
||||||
char *loc = NULL;
|
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);
|
cString addr(loc, true);
|
||||||
free(loc);
|
free(loc);
|
||||||
*Protocol = pUdpProtocol;
|
*Protocol = pUdpProtocol;
|
||||||
return addr;
|
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);
|
cString addr(loc, true);
|
||||||
free(loc);
|
free(loc);
|
||||||
*Protocol = pHttpProtocol;
|
*Protocol = pHttpProtocol;
|
||||||
return addr;
|
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);
|
cString addr(loc, true);
|
||||||
free(loc);
|
free(loc);
|
||||||
*Protocol = pFileProtocol;
|
*Protocol = pFileProtocol;
|
||||||
|
Loading…
Reference in New Issue
Block a user