miniupnpc: Show error message when GetExternalIPAddress returns empty string
According to IGD v2.0 specification GetExternalIPAddress can return also empty string in case of error.
This commit is contained in:
parent
79ca440f73
commit
20ee72f9c8
|
@ -111,6 +111,8 @@ static void DisplayInfos(struct UPNPUrls * urls,
|
|||
externalIPAddress);
|
||||
if(r != UPNPCOMMAND_SUCCESS) {
|
||||
printf("GetExternalIPAddress failed. (errorcode=%d)\n", r);
|
||||
} else if(!externalIPAddress[0]) {
|
||||
printf("GetExternalIPAddress failed. (empty string)\n");
|
||||
} else {
|
||||
printf("ExternalIPAddress = %s\n", externalIPAddress);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue