Skip to content

Commit

Permalink
fix NRE in CommsInterface for .NET
Browse files Browse the repository at this point in the history
  • Loading branch information
rdavisau committed Mar 11, 2015
1 parent 3940bbc commit 506a544
Show file tree
Hide file tree
Showing 15 changed files with 39 additions and 25 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
_This changelog refers to nuget package releases._

#### 1.1.5 (2015-03-11)

Bugfixes:

- Fixed a `NullReferenceException` that could occur in `CommsInterface.GetAllInterfacesAsync` if an interface had no IPv4 unicast address.

#### 1.1.4 (2015-02-09)

Features:
Expand Down Expand Up @@ -34,7 +40,7 @@ Other:

Bugfixes:

- Fixed a NullReferenceException in the .NET abstraction that would occur if a ````UdpSocketReceiver````'s ````SendToAsync```` method was called before ````StartListeningAsync````.
- Fixed a `NullReferenceException` in the .NET abstraction that would occur if a ````UdpSocketReceiver````'s ````SendToAsync```` method was called before ````StartListeningAsync````.

#### 1.0.0.0 (2014-12-03)

Expand Down
8 changes: 7 additions & 1 deletion Sockets.Plugin.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata minClientVersion="2.8.1">
<id>rda.SocketsForPCL</id>
<version>1.1.4</version>
<version>1.1.5</version>
<title>Sockets Plugin for Xamarin and Windows (PCL)</title>
<authors>Ryan Davis</authors>
<owners>Ryan Davis</owners>
Expand All @@ -13,6 +13,12 @@
<copyright>2015 Ryan Davis</copyright>
<iconUrl>https://raw.githubusercontent.com/rdavisau/sockets-for-pcl/master/_meta/icon/icon.png</iconUrl>
<releaseNotes>
1.1.5 (2015-03-11)

Bugfixes:

- Fixed a `NullReferenceException` that could occur in `CommsInterface.GetAllInterfacesAsync` if an interface had no IPv4 unicast address.

1.1.4 (2015-02-09)

Features:
Expand Down
2 changes: 2 additions & 0 deletions Sockets.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=PCL/@EntryIndexedValue">PCL</s:String></wpf:ResourceDictionary>
2 changes: 1 addition & 1 deletion Sockets/Sockets.Implementation.NET/CommsInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ internal static CommsInterface FromNativeInterface(NetworkInterface nativeInterf
.Select(a => a.Address.ToString())
.FirstOrDefault();

var netmask = GetSubnetMask(ip); // implemented natively for each .NET platform
var netmask = ip != null ? GetSubnetMask(ip) : null; // implemented natively for each .NET platform

var broadcast = (ip != null && netmask != null) ? ip.Address.GetBroadcastAddress(netmask).ToString() : null;

Expand Down
4 changes: 2 additions & 2 deletions Sockets/Sockets.Implementation.NET/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.1.4")]
[assembly: AssemblyFileVersion("1.1.4")]
[assembly: AssemblyVersion("1.1.5")]
[assembly: AssemblyFileVersion("1.1.5")]
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.1.4")]
[assembly: AssemblyFileVersion("1.1.4")]
[assembly: AssemblyVersion("1.1.5")]
[assembly: AssemblyFileVersion("1.1.5")]
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.1.4")]
[assembly: AssemblyFileVersion("1.1.4")]
[assembly: AssemblyVersion("1.1.5")]
[assembly: AssemblyFileVersion("1.1.5")]
4 changes: 2 additions & 2 deletions Sockets/Sockets.Plugin.Android/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.1.4")]
[assembly: AssemblyFileVersion("1.1.4")]
[assembly: AssemblyVersion("1.1.5")]
[assembly: AssemblyFileVersion("1.1.5")]
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.1.4")]
[assembly: AssemblyFileVersion("1.1.4")]
[assembly: AssemblyVersion("1.1.5")]
[assembly: AssemblyFileVersion("1.1.5")]
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:

[assembly: AssemblyVersion("1.1.4")]
[assembly: AssemblyFileVersion("1.1.4")]
[assembly: AssemblyVersion("1.1.5")]
[assembly: AssemblyFileVersion("1.1.5")]
[assembly: NeutralResourcesLanguage("en-US")]
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.1.4")]
[assembly: AssemblyFileVersion("1.1.4")]
[assembly: AssemblyVersion("1.1.5")]
[assembly: AssemblyFileVersion("1.1.5")]
[assembly: ComVisible(false)]
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.1.4")]
[assembly: AssemblyFileVersion("1.1.4")]
[assembly: AssemblyVersion("1.1.5")]
[assembly: AssemblyFileVersion("1.1.5")]
[assembly: ComVisible(false)]
4 changes: 2 additions & 2 deletions Sockets/Sockets.Plugin.iOS/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.1.4")]
[assembly: AssemblyFileVersion("1.1.4")]
[assembly: AssemblyVersion("1.1.5")]
[assembly: AssemblyFileVersion("1.1.5")]
4 changes: 2 additions & 2 deletions Sockets/Sockets.Plugin.iOSUnified/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.1.4")]
[assembly: AssemblyFileVersion("1.1.4")]
[assembly: AssemblyVersion("1.1.5")]
[assembly: AssemblyFileVersion("1.1.5")]
4 changes: 2 additions & 2 deletions Sockets/Sockets.Plugin/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.1.4")]
[assembly: AssemblyFileVersion("1.1.4")]
[assembly: AssemblyVersion("1.1.5")]
[assembly: AssemblyFileVersion("1.1.5")]

0 comments on commit 506a544

Please sign in to comment.