Added more debug info to UPnP
This commit is contained in:
parent
73d921c6c5
commit
41bf638a75
1 changed files with 6 additions and 1 deletions
|
@ -49,13 +49,18 @@ public:
|
|||
hResult = spmc->Add(externalPort, proto, internalPort, clientStr, true, desc, &spm);
|
||||
SysFreeString(clientStr);
|
||||
SysFreeString(desc);
|
||||
|
||||
|
||||
if(SUCCEEDED(hResult) && spm) {
|
||||
//Successfully added a new port mapping
|
||||
std::cout << std::dec << "Forwarded port " << externalPort << " to IP ";
|
||||
std::wcout << localIP.c_str() << std::endl;
|
||||
spm->Release();
|
||||
result = true;
|
||||
} else {
|
||||
std::cout << "Unable to add UPnP port mapping. ";
|
||||
std::cout << "IP: ";
|
||||
std::wcout << localIP.c_str();
|
||||
std::cout << " HRESULT: 0x" << std::hex << hResult << std::endl;
|
||||
}
|
||||
spmc->Release();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue