From a05766c90d0f30d20f6b234b1fd4e7fd4462956b Mon Sep 17 00:00:00 2001 From: Rolf Ahrenberg Date: Fri, 10 Sep 2010 23:41:26 +0300 Subject: [PATCH] The "inetAddr" must be set after CloseSocket(). --- po/de_DE.po | 1 - po/fi_FI.po | 1 - po/fr_FR.po | 1 - po/it_IT.po | 1 - po/nl_NL.po | 1 - po/ru_RU.po | 1 - socket.c | 5 +++-- 7 files changed, 3 insertions(+), 8 deletions(-) diff --git a/po/de_DE.po b/po/de_DE.po index b51a02a..4105734 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -11,7 +11,6 @@ msgstr "" "PO-Revision-Date: 2010-09-09 09:09+0300\n" "Last-Translator: Tobias Grimm \n" "Language-Team: German\n" -"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/po/fi_FI.po b/po/fi_FI.po index d45cd3f..3f4e66a 100644 --- a/po/fi_FI.po +++ b/po/fi_FI.po @@ -11,7 +11,6 @@ msgstr "" "PO-Revision-Date: 2010-09-09 09:09+0300\n" "Last-Translator: Rolf Ahrenberg\n" "Language-Team: \n" -"Language: fi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/po/fr_FR.po b/po/fr_FR.po index b9d568e..5147c45 100644 --- a/po/fr_FR.po +++ b/po/fr_FR.po @@ -12,7 +12,6 @@ msgstr "" "PO-Revision-Date: 2010-09-09 09:09+0300\n" "Last-Translator: NIVAL Michaƫl \n" "Language-Team: French\n" -"Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/po/it_IT.po b/po/it_IT.po index 987c51b..6ac96de 100644 --- a/po/it_IT.po +++ b/po/it_IT.po @@ -11,7 +11,6 @@ msgstr "" "PO-Revision-Date: 2010-09-09 09:09+0300\n" "Last-Translator: Diego Pierotto \n" "Language-Team: Italian\n" -"Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/po/nl_NL.po b/po/nl_NL.po index 3bb7848..c7a107f 100644 --- a/po/nl_NL.po +++ b/po/nl_NL.po @@ -11,7 +11,6 @@ msgstr "" "PO-Revision-Date: 2010-09-09 09:09+0300\n" "Last-Translator: Carel\n" "Language-Team: Dutch\n" -"Language: nl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/po/ru_RU.po b/po/ru_RU.po index 2b62e31..0caa6eb 100644 --- a/po/ru_RU.po +++ b/po/ru_RU.po @@ -11,7 +11,6 @@ msgstr "" "PO-Revision-Date: 2010-09-09 09:09+0300\n" "Last-Translator: Alexander Gross \n" "Language-Team: Russian \n" -"Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/socket.c b/socket.c index 8855bde..541ea6e 100644 --- a/socket.c +++ b/socket.c @@ -37,14 +37,15 @@ cIptvSocket::~cIptvSocket() bool cIptvSocket::OpenSocket(const in_addr_t InetAddr, const int Port, const bool isUdp) { debug("cIptvSocket::OpenSocket()\n"); - if (inetAddr != InetAddr) - inetAddr = InetAddr; // If socket is there already and it is bound to a different port, it must // be closed first if (Port != socketPort) { debug("cIptvSocket::OpenSocket(): Socket tear-down\n"); CloseSocket(); } + // inetAddr must be set after CloseSocket() + if (inetAddr != InetAddr) + inetAddr = InetAddr; // Bind to the socket if it is not active already if (socketDesc < 0) { int yes = 1;