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:
parent
0e73448ea8
commit
a362d06dff
@ -2,6 +2,11 @@
|
|||||||
Version 1.6.7
|
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>
|
2010-08-21 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
|
||||||
* gena_subscribe(): Fix for IPV6 ULA/GUA issues.
|
* gena_subscribe(): Fix for IPV6 ULA/GUA issues.
|
||||||
|
|
||||||
|
@ -327,6 +327,7 @@ static void RunMiniServer(
|
|||||||
SOCKET miniServStopSock = miniSock->miniServerStopSock;
|
SOCKET miniServStopSock = miniSock->miniServerStopSock;
|
||||||
SOCKET ssdpSock4 = miniSock->ssdpSock4;
|
SOCKET ssdpSock4 = miniSock->ssdpSock4;
|
||||||
SOCKET ssdpSock6 = miniSock->ssdpSock6;
|
SOCKET ssdpSock6 = miniSock->ssdpSock6;
|
||||||
|
SOCKET ssdpSock6UlaGua = miniSock->ssdpSock6UlaGua;
|
||||||
#ifdef INTERNAL_WEB_SERVER
|
#ifdef INTERNAL_WEB_SERVER
|
||||||
SOCKET miniServSock4 = miniSock->miniServerSock4;
|
SOCKET miniServSock4 = miniSock->miniServerSock4;
|
||||||
SOCKET miniServSock6 = miniSock->miniServerSock6;
|
SOCKET miniServSock6 = miniSock->miniServerSock6;
|
||||||
@ -357,6 +358,9 @@ static void RunMiniServer(
|
|||||||
if (ssdpSock6 != INVALID_SOCKET) {
|
if (ssdpSock6 != INVALID_SOCKET) {
|
||||||
maxMiniSock = max(maxMiniSock, ssdpSock6);
|
maxMiniSock = max(maxMiniSock, ssdpSock6);
|
||||||
}
|
}
|
||||||
|
if (ssdpSock6UlaGua != INVALID_SOCKET) {
|
||||||
|
maxMiniSock = max(maxMiniSock, ssdpSock6UlaGua);
|
||||||
|
}
|
||||||
#ifdef INCLUDE_CLIENT_APIS
|
#ifdef INCLUDE_CLIENT_APIS
|
||||||
if (ssdpReqSock4 != INVALID_SOCKET) {
|
if (ssdpReqSock4 != INVALID_SOCKET) {
|
||||||
maxMiniSock = max(maxMiniSock, ssdpReqSock4);
|
maxMiniSock = max(maxMiniSock, ssdpReqSock4);
|
||||||
@ -389,6 +393,9 @@ static void RunMiniServer(
|
|||||||
if(ssdpSock6 != INVALID_SOCKET) {
|
if(ssdpSock6 != INVALID_SOCKET) {
|
||||||
FD_SET(ssdpSock6, &rdSet);
|
FD_SET(ssdpSock6, &rdSet);
|
||||||
}
|
}
|
||||||
|
if(ssdpSock6UlaGua != INVALID_SOCKET) {
|
||||||
|
FD_SET(ssdpSock6UlaGua, &rdSet);
|
||||||
|
}
|
||||||
#ifdef INCLUDE_CLIENT_APIS
|
#ifdef INCLUDE_CLIENT_APIS
|
||||||
if(ssdpReqSock4 != INVALID_SOCKET) {
|
if(ssdpReqSock4 != INVALID_SOCKET) {
|
||||||
FD_SET(ssdpReqSock4, &rdSet);
|
FD_SET(ssdpReqSock4, &rdSet);
|
||||||
@ -454,6 +461,10 @@ static void RunMiniServer(
|
|||||||
FD_ISSET(ssdpSock6, &rdSet)) {
|
FD_ISSET(ssdpSock6, &rdSet)) {
|
||||||
readFromSSDPSocket(ssdpSock6);
|
readFromSSDPSocket(ssdpSock6);
|
||||||
}
|
}
|
||||||
|
if (ssdpSock6UlaGua != INVALID_SOCKET &&
|
||||||
|
FD_ISSET(ssdpSock6UlaGua, &rdSet)) {
|
||||||
|
readFromSSDPSocket(ssdpSock6UlaGua);
|
||||||
|
}
|
||||||
if (ssdpSock4 != INVALID_SOCKET &&
|
if (ssdpSock4 != INVALID_SOCKET &&
|
||||||
FD_ISSET(ssdpSock4, &rdSet)) {
|
FD_ISSET(ssdpSock4, &rdSet)) {
|
||||||
readFromSSDPSocket(ssdpSock4);
|
readFromSSDPSocket(ssdpSock4);
|
||||||
@ -494,6 +505,8 @@ static void RunMiniServer(
|
|||||||
UpnpCloseSocket(ssdpSock4);
|
UpnpCloseSocket(ssdpSock4);
|
||||||
shutdown(ssdpSock6, SD_BOTH);
|
shutdown(ssdpSock6, SD_BOTH);
|
||||||
UpnpCloseSocket(ssdpSock6);
|
UpnpCloseSocket(ssdpSock6);
|
||||||
|
shutdown(ssdpSock6UlaGua, SD_BOTH);
|
||||||
|
UpnpCloseSocket(ssdpSock6UlaGua);
|
||||||
#ifdef INCLUDE_CLIENT_APIS
|
#ifdef INCLUDE_CLIENT_APIS
|
||||||
shutdown(ssdpReqSock4, SD_BOTH);
|
shutdown(ssdpReqSock4, SD_BOTH);
|
||||||
UpnpCloseSocket(ssdpReqSock4);
|
UpnpCloseSocket(ssdpReqSock4);
|
||||||
@ -930,6 +943,8 @@ int StartMiniServer(
|
|||||||
UpnpCloseSocket(miniSocket->ssdpSock4);
|
UpnpCloseSocket(miniSocket->ssdpSock4);
|
||||||
shutdown(miniSocket->ssdpSock6, SD_BOTH);
|
shutdown(miniSocket->ssdpSock6, SD_BOTH);
|
||||||
UpnpCloseSocket(miniSocket->ssdpSock6);
|
UpnpCloseSocket(miniSocket->ssdpSock6);
|
||||||
|
shutdown(miniSocket->ssdpSock6UlaGua, SD_BOTH);
|
||||||
|
UpnpCloseSocket(miniSocket->ssdpSock6UlaGua);
|
||||||
#ifdef INCLUDE_CLIENT_APIS
|
#ifdef INCLUDE_CLIENT_APIS
|
||||||
shutdown(miniSocket->ssdpReqSock4, SD_BOTH );
|
shutdown(miniSocket->ssdpReqSock4, SD_BOTH );
|
||||||
UpnpCloseSocket(miniSocket->ssdpReqSock4 );
|
UpnpCloseSocket(miniSocket->ssdpReqSock4 );
|
||||||
@ -959,6 +974,8 @@ int StartMiniServer(
|
|||||||
UpnpCloseSocket(miniSocket->ssdpSock4);
|
UpnpCloseSocket(miniSocket->ssdpSock4);
|
||||||
shutdown(miniSocket->ssdpSock6, SD_BOTH);
|
shutdown(miniSocket->ssdpSock6, SD_BOTH);
|
||||||
UpnpCloseSocket(miniSocket->ssdpSock6);
|
UpnpCloseSocket(miniSocket->ssdpSock6);
|
||||||
|
shutdown(miniSocket->ssdpSock6UlaGua, SD_BOTH);
|
||||||
|
UpnpCloseSocket(miniSocket->ssdpSock6UlaGua);
|
||||||
#ifdef INCLUDE_CLIENT_APIS
|
#ifdef INCLUDE_CLIENT_APIS
|
||||||
shutdown(miniSocket->ssdpReqSock4, SD_BOTH);
|
shutdown(miniSocket->ssdpReqSock4, SD_BOTH);
|
||||||
UpnpCloseSocket(miniSocket->ssdpReqSock4);
|
UpnpCloseSocket(miniSocket->ssdpReqSock4);
|
||||||
|
Loading…
Reference in New Issue
Block a user