View | Details | Raw Unified | Return to bug 203983
Collapse All | Expand All

(-)source/network/NetServer.cpp (-1 / +2 lines)
Lines 228-233 void* CNetServerWorker::SetupUPnP(void*) Link Here
228
228
229
	int ret = 0;
229
	int ret = 0;
230
	bool allocatedUrls = false;
230
	bool allocatedUrls = false;
231
	int	error	=	0; // Set this for upnpDiscover
231
232
232
	// Try a cached URL first
233
	// Try a cached URL first
233
	if (!rootDescURL.empty() && UPNP_GetIGDFromUrl(rootDescURL.c_str(), &urls, &data, internalIPAddress, sizeof(internalIPAddress)))
234
	if (!rootDescURL.empty() && UPNP_GetIGDFromUrl(rootDescURL.c_str(), &urls, &data, internalIPAddress, sizeof(internalIPAddress)))
Lines 236-242 void* CNetServerWorker::SetupUPnP(void*) Link Here
236
		ret = 1;
237
		ret = 1;
237
	}
238
	}
238
	// No cached URL, or it did not respond. Try getting a valid UPnP device for 10 seconds.
239
	// No cached URL, or it did not respond. Try getting a valid UPnP device for 10 seconds.
239
	else if ((devlist = upnpDiscover(10000, 0, 0, 0, 0, 0)) != NULL)
240
	else if ((devlist = upnpDiscover(10000, 0, 0, 0, 0, 0,&error)) != NULL)
240
	{
241
	{
241
		ret = UPNP_GetValidIGD(devlist, &urls, &data, internalIPAddress, sizeof(internalIPAddress));
242
		ret = UPNP_GetValidIGD(devlist, &urls, &data, internalIPAddress, sizeof(internalIPAddress));
242
		allocatedUrls = ret != 0; // urls is allocated on non-zero return values
243
		allocatedUrls = ret != 0; // urls is allocated on non-zero return values

Return to bug 203983