Skip to content

Commit

Permalink
* Mono.Nat/Upnp/UpnpNatDevice.cs: Copy the description from the
Browse files Browse the repository at this point in the history
  router response to the Mapping instance so the user can see it.
  Bugreport and patch by nivanov.

svn path=/trunk/Mono.Nat/; revision=155274
  • Loading branch information
alanmcgovern committed Apr 12, 2010
1 parent 5744bd5 commit 73b6a31
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Mono.Nat/Upnp/UpnpNatDevice.cs
Expand Up @@ -435,6 +435,7 @@ private void EndGetAllMappingsInternal(IAsyncResult result)
if (message != null)
{
Mapping mapping = new Mapping (message.Protocol, message.InternalPort, message.ExternalPort, message.LeaseDuration);
mapping.Description = message.PortMappingDescription;
mappingResult.Mappings.Add(mapping);
GetGenericPortMappingEntry next = new GetGenericPortMappingEntry(mappingResult.Mappings.Count, this);

Expand Down Expand Up @@ -468,7 +469,8 @@ private void EndGetSpecificMappingInternal(IAsyncResult result)
GetAllMappingsAsyncResult mappingResult = result.AsyncState as GetAllMappingsAsyncResult;
GetGenericPortMappingEntryResponseMessage message = mappingResult.SavedMessage as GetGenericPortMappingEntryResponseMessage;
if (message != null) {
Mapping mapping = new Mapping(mappingResult.SpecificMapping.Protocol, message.InternalPort, mappingResult.SpecificMapping.PublicPort, message.LeaseDuration);
Mapping mapping = new Mapping(mappingResult.SpecificMapping.Protocol, message.InternalPort, mappingResult.SpecificMapping.PublicPort, message.LeaseDuration);
mapping.Description = mappingResult.SpecificMapping.Description;
mappingResult.Mappings.Add(mapping);
}

Expand Down

0 comments on commit 73b6a31

Please sign in to comment.