ACTUALIZED LIBRARY 0 Open (Default) 1 WEP-128 2 WPA1 3 Mixed WPA1 & WPA2-PSK 4 WPA2-PSK 5 Not Used 6 Adhoc, Join any Adhoc network

Dependents:   mbed_Arduino_sensor

Fork of WiflyInterface by Samuel Mokrani

Files at this revision

API Documentation at this revision

Comitter:
samux
Date:
Thu Aug 23 16:03:52 2012 +0000
Parent:
9:aeddb7353e6e
Commit message:
error msg if no existing wifly instance

Changed in this revision

Socket/Endpoint.cpp Show annotated file Show diff for this revision Revisions of this file
Socket/Socket.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Socket/Endpoint.cpp	Thu Aug 23 15:18:48 2012 +0000
+++ b/Socket/Endpoint.cpp	Thu Aug 23 16:03:52 2012 +0000
@@ -23,6 +23,8 @@
 
 Endpoint::Endpoint()  {
     wifly = Wifly::getInstance();
+    if (wifly == NULL)
+        printf("Endpoint constructor error: no wifly instance available!\r\n");
     reset_address();
 }
 Endpoint::~Endpoint() {}
--- a/Socket/Socket.cpp	Thu Aug 23 15:18:48 2012 +0000
+++ b/Socket/Socket.cpp	Thu Aug 23 16:03:52 2012 +0000
@@ -19,9 +19,10 @@
 #include "Socket.h"
 #include <cstring>
 
-
 Socket::Socket() : _blocking(true), _timeout(1500) {
     wifi = Wifly::getInstance();
+    if (wifi == NULL)
+        printf("Socket constructor error: no wifly instance available!\r\n");
 }
 
 void Socket::set_blocking(bool blocking, unsigned int timeout) {