Fix win32 compilation errors in visual studio

(cherry picked from commit ea00f0f222)
This commit is contained in:
Chandra Penke 2010-09-14 16:16:38 -07:00 committed by Marcelo Roberto Jimenez
parent fe778cfd00
commit 48985cb81b
2 changed files with 4 additions and 3 deletions

View File

@ -1012,7 +1012,7 @@ int UpnpRegisterRootDevice3(
struct Handle_Info *HInfo;
int retVal = 0;
int hasServiceTable = 0;
int handler_index = 0;
HandleLock();
UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__,
@ -1041,7 +1041,7 @@ int UpnpRegisterRootDevice3(
/* Test for already registered IPV6. IPV6 devices might register on multiple
* IPv6 addresses (link local and GUA or ULA), so we must to check the
* description URL in the HandleTable. */
int handler_index = 0;
while (handler_index < NUM_HANDLE && HandleTable[handler_index] != NULL) {
if (strcmp(((struct Handle_Info *)HandleTable[handler_index])->DescURL, DescUrl)) {
retVal = UPNP_E_ALREADY_REGISTERED;

View File

@ -421,6 +421,7 @@ void CreateServicePacket(
}
} else if (msg_type == MSGTYPE_ADVERTISEMENT ||
msg_type == MSGTYPE_SHUTDOWN) {
char *host = NULL;
if (msg_type == MSGTYPE_ADVERTISEMENT) {
nts = "ssdp:alive";
} else {
@ -429,7 +430,7 @@ void CreateServicePacket(
}
/* NOTE: The CACHE-CONTROL and LOCATION headers are not present in
* a shutdown msg, but are present here for MS WinMe interop. */
char *host = NULL;
if (AddressFamily == AF_INET) {
host = SSDP_IP;
} else {