upnp/src/genlib/miniserver/miniserver.c: Fix for IPV6 ULA/GUA issues.

git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@576 119443c7-1b9e-41f8-b6fc-b9c35fce742c
This commit is contained in:
Marcelo Roberto Jimenez 2010-08-21 22:13:26 +00:00
parent 0e73448ea8
commit a362d06dff
2 changed files with 22 additions and 0 deletions

View File

@ -2,6 +2,11 @@
Version 1.6.7
*******************************************************************************
2010-08-21 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
* upnp/src/genlib/miniserver/miniserver.c: Fix for IPV6 ULA/GUA issues.
Patch submitted by Ronan Menard.
2010-08-21 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
* gena_subscribe(): Fix for IPV6 ULA/GUA issues.

View File

@ -327,6 +327,7 @@ static void RunMiniServer(
SOCKET miniServStopSock = miniSock->miniServerStopSock;
SOCKET ssdpSock4 = miniSock->ssdpSock4;
SOCKET ssdpSock6 = miniSock->ssdpSock6;
SOCKET ssdpSock6UlaGua = miniSock->ssdpSock6UlaGua;
#ifdef INTERNAL_WEB_SERVER
SOCKET miniServSock4 = miniSock->miniServerSock4;
SOCKET miniServSock6 = miniSock->miniServerSock6;
@ -357,6 +358,9 @@ static void RunMiniServer(
if (ssdpSock6 != INVALID_SOCKET) {
maxMiniSock = max(maxMiniSock, ssdpSock6);
}
if (ssdpSock6UlaGua != INVALID_SOCKET) {
maxMiniSock = max(maxMiniSock, ssdpSock6UlaGua);
}
#ifdef INCLUDE_CLIENT_APIS
if (ssdpReqSock4 != INVALID_SOCKET) {
maxMiniSock = max(maxMiniSock, ssdpReqSock4);
@ -389,6 +393,9 @@ static void RunMiniServer(
if(ssdpSock6 != INVALID_SOCKET) {
FD_SET(ssdpSock6, &rdSet);
}
if(ssdpSock6UlaGua != INVALID_SOCKET) {
FD_SET(ssdpSock6UlaGua, &rdSet);
}
#ifdef INCLUDE_CLIENT_APIS
if(ssdpReqSock4 != INVALID_SOCKET) {
FD_SET(ssdpReqSock4, &rdSet);
@ -454,6 +461,10 @@ static void RunMiniServer(
FD_ISSET(ssdpSock6, &rdSet)) {
readFromSSDPSocket(ssdpSock6);
}
if (ssdpSock6UlaGua != INVALID_SOCKET &&
FD_ISSET(ssdpSock6UlaGua, &rdSet)) {
readFromSSDPSocket(ssdpSock6UlaGua);
}
if (ssdpSock4 != INVALID_SOCKET &&
FD_ISSET(ssdpSock4, &rdSet)) {
readFromSSDPSocket(ssdpSock4);
@ -494,6 +505,8 @@ static void RunMiniServer(
UpnpCloseSocket(ssdpSock4);
shutdown(ssdpSock6, SD_BOTH);
UpnpCloseSocket(ssdpSock6);
shutdown(ssdpSock6UlaGua, SD_BOTH);
UpnpCloseSocket(ssdpSock6UlaGua);
#ifdef INCLUDE_CLIENT_APIS
shutdown(ssdpReqSock4, SD_BOTH);
UpnpCloseSocket(ssdpReqSock4);
@ -930,6 +943,8 @@ int StartMiniServer(
UpnpCloseSocket(miniSocket->ssdpSock4);
shutdown(miniSocket->ssdpSock6, SD_BOTH);
UpnpCloseSocket(miniSocket->ssdpSock6);
shutdown(miniSocket->ssdpSock6UlaGua, SD_BOTH);
UpnpCloseSocket(miniSocket->ssdpSock6UlaGua);
#ifdef INCLUDE_CLIENT_APIS
shutdown(miniSocket->ssdpReqSock4, SD_BOTH );
UpnpCloseSocket(miniSocket->ssdpReqSock4 );
@ -959,6 +974,8 @@ int StartMiniServer(
UpnpCloseSocket(miniSocket->ssdpSock4);
shutdown(miniSocket->ssdpSock6, SD_BOTH);
UpnpCloseSocket(miniSocket->ssdpSock6);
shutdown(miniSocket->ssdpSock6UlaGua, SD_BOTH);
UpnpCloseSocket(miniSocket->ssdpSock6UlaGua);
#ifdef INCLUDE_CLIENT_APIS
shutdown(miniSocket->ssdpReqSock4, SD_BOTH);
UpnpCloseSocket(miniSocket->ssdpReqSock4);