Skip to content
This repository has been archived by the owner on Jun 8, 2024. It is now read-only.

Commit

Permalink
Non-break control for situations where an external ip was not returne…
Browse files Browse the repository at this point in the history
…d by device. (#77)
  • Loading branch information
renatochitolina authored and lontivero committed May 17, 2018
1 parent 6d54c86 commit 328b6ee
Showing 1 changed file with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,18 @@

namespace Open.Nat
{
internal class GetExternalIPAddressResponseMessage : ResponseMessageBase
{
public GetExternalIPAddressResponseMessage(XmlDocument response, string serviceType)
: base(response, serviceType, "GetExternalIPAddressResponseMessage")
{
string ip = GetNode().GetXmlElementText("NewExternalIPAddress");
ExternalIPAddress = IPAddress.Parse(ip);
}
internal class GetExternalIPAddressResponseMessage : ResponseMessageBase
{
public GetExternalIPAddressResponseMessage(XmlDocument response, string serviceType)
: base(response, serviceType, "GetExternalIPAddressResponseMessage")
{
string ip = GetNode().GetXmlElementText("NewExternalIPAddress");

public IPAddress ExternalIPAddress { get; private set; }
}
IPAddress ipAddr;
if (IPAddress.TryParse(ip, out ipAddr))
ExternalIPAddress = ipAddr;
}

public IPAddress ExternalIPAddress { get; private set; }
}
}

0 comments on commit 328b6ee

Please sign in to comment.