NetworkSocketAPI

Dependencies:   DnsQuery

Dependents:   HelloWizFi250Interface

Fork of NetworkSocketAPI by NetworkSocketAPI

Files at this revision

API Documentation at this revision

Comitter:
Christopher Haster
Date:
Tue May 10 12:05:14 2016 -0500
Parent:
121:eaea4c1291c2
Child:
123:556a038fdf63
Commit message:
Fix bug with SocketAddress init

per c1728p9

Changed in this revision

SocketAddress.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/SocketAddress.cpp	Mon May 09 22:40:30 2016 -0500
+++ b/SocketAddress.cpp	Tue May 10 12:05:14 2016 -0500
@@ -209,10 +209,10 @@
 {
     _ip_address[0] = '\0';
 
-    if (_ip_version == NSAPI_IPv4) {
+    if (version == NSAPI_IPv4) {
         _ip_version = NSAPI_IPv4;
         memcpy(_ip_bytes, bytes, NSAPI_IPv4_BYTES);
-    } else if (_ip_version == NSAPI_IPv6) {
+    } else if (version == NSAPI_IPv6) {
         _ip_version = NSAPI_IPv6;
         memcpy(_ip_bytes, bytes, NSAPI_IPv6_BYTES);
     } else {