1
0
mirror of https://github.com/rofafor/vdr-plugin-iptv.git synced 2023-10-10 13:37:03 +02:00

Fixed TCP socket connection and silenced compilation warnings.

This commit is contained in:
Rolf Ahrenberg 2012-04-26 21:32:20 +03:00
parent c33b05076a
commit 06506c41f6
9 changed files with 12 additions and 9 deletions

View File

@ -171,4 +171,4 @@ VDR Plugin 'iptv' Revision History
2012-04-26: Version 0.5.2
- Fixed response header parsing in HTTP protocol.
- Fixed connection problems in HTTP protocol.

View File

@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-iptv 0.5.1\n"
"Project-Id-Version: vdr-iptv 0.5.2\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2012-02-02 02:02+0300\n"
"PO-Revision-Date: 2012-02-02 02:02+0300\n"

View File

@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-iptv 0.5.1\n"
"Project-Id-Version: vdr-iptv 0.5.2\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2012-02-02 02:02+0300\n"
"PO-Revision-Date: 2012-02-02 02:02+0300\n"

View File

@ -6,7 +6,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-iptv 0.5.1\n"
"Project-Id-Version: vdr-iptv 0.5.2\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2012-02-02 02:02+0300\n"
"PO-Revision-Date: 2010-09-09 09:09+0300\n"

View File

@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-iptv 0.5.1\n"
"Project-Id-Version: vdr-iptv 0.5.2\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2012-02-02 02:02+0300\n"
"PO-Revision-Date: 2012-02-02 02:02+0300\n"

View File

@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-iptv 0.5.1\n"
"Project-Id-Version: vdr-iptv 0.5.2\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2012-02-02 02:02+0300\n"
"PO-Revision-Date: 2012-02-02 02:02+0300\n"

View File

@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-iptv 0.5.1\n"
"Project-Id-Version: vdr-iptv 0.5.2\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2012-02-02 02:02+0300\n"
"PO-Revision-Date: 2010-09-09 09:09+0300\n"

View File

@ -134,7 +134,7 @@ bool cIptvProtocolHttp::ProcessHeaders(void)
char buf[4096];
// Generate HTTP response format string with 2 arguments
snprintf(fmt, sizeof(fmt), "HTTP/1.%%%ldi %%%ldi ", sizeof(version) - 1, sizeof(response) - 1);
snprintf(fmt, sizeof(fmt), "HTTP/1.%%%zui %%%zui ", sizeof(version) - 1, sizeof(response) - 1);
while (!responseFound || lineLength != 0) {
memset(buf, '\0', sizeof(buf));

View File

@ -238,6 +238,9 @@ bool cIptvTcpSocket::OpenSocket(const int Port, const char *StreamAddr)
{
debug("cIptvTcpSocket::OpenSocket()\n");
// Socket must be opened before setting the host address
bool retval = cIptvSocket::OpenSocket(Port, false);
// First try only the IP address
sockAddr.sin_addr.s_addr = inet_addr(StreamAddr);
@ -256,7 +259,7 @@ bool cIptvTcpSocket::OpenSocket(const int Port, const char *StreamAddr)
sockAddr.sin_addr.s_addr = inet_addr(*host->h_addr_list);
}
return cIptvSocket::OpenSocket(Port, false);
return retval;
}
void cIptvTcpSocket::CloseSocket(void)