include some debugs

Fork of Socket by mbed official

Files at this revision

API Documentation at this revision

Comitter:
klauss
Date:
Thu Oct 02 12:37:35 2014 +0000
Parent:
19:434906b5b977
Commit message:
debug msgs

Changed in this revision

TCPSocketServer.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/TCPSocketServer.cpp	Mon Aug 19 18:38:18 2013 +0300
+++ b/TCPSocketServer.cpp	Thu Oct 02 12:37:35 2014 +0000
@@ -16,6 +16,7 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 #include "TCPSocketServer.h"
+#include "debug.h"
 
 #include <cstring>
 
@@ -58,20 +59,27 @@
 }
 
 int TCPSocketServer::accept(TCPSocketConnection& connection) {
+    debug_msg("");
     if (_sock_fd < 0)
         return -1;
     
     if (!_blocking) {
+        debug_msg("");
         TimeInterval timeout(_timeout);
         if (wait_readable(timeout) != 0)
             return -1;
     }
+    debug_msg("");
     connection.reset_address();
+    debug_msg("");
     socklen_t newSockRemoteHostLen = sizeof(connection._remoteHost);
+    debug_msg("");
     int fd = lwip_accept(_sock_fd, (struct sockaddr*) &connection._remoteHost, &newSockRemoteHostLen);
     if (fd < 0)
         return -1; //Accept failed
+    debug_msg("");
     connection._sock_fd = fd;
+    debug_msg("");
     connection._is_connected = true;
     
     return 0;