X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/72041ceca262d33763df632bd57b97bc8718740c..8290d43d0d43369d007f1c47abf98a45da461a30:/src/unix/gsocket.c?ds=inline diff --git a/src/unix/gsocket.c b/src/unix/gsocket.c index ce7cf36299..5b3c647893 100644 --- a/src/unix/gsocket.c +++ b/src/unix/gsocket.c @@ -201,7 +201,7 @@ void GSocket_Shutdown(GSocket *socket) for (evt = 0; evt < GSOCK_MAX_EVENT; evt++) socket->m_cbacks[evt] = NULL; - socket->m_detected = 0; + socket->m_detected = GSOCK_LOST_FLAG; _GSocket_Disable_Events(socket); } @@ -714,6 +714,8 @@ int GSocket_Write(GSocket *socket, const char *buffer, int size) int ret; assert(socket != NULL); + + printf( "GSocket_Write #1, size %d\n", size ); if (socket->m_fd == -1 || socket->m_server) { @@ -721,16 +723,22 @@ int GSocket_Write(GSocket *socket, const char *buffer, int size) return -1; } + printf( "GSocket_Write #2, size %d\n", size ); + /* If the socket is blocking, wait for writability (with a timeout) */ if (_GSocket_Output_Timeout(socket) == GSOCK_TIMEDOUT) return -1; + printf( "GSocket_Write #3, size %d\n", size ); + /* Write the data */ if (socket->m_stream) ret = _GSocket_Send_Stream(socket, buffer, size); else ret = _GSocket_Send_Dgram(socket, buffer, size); + printf( "GSocket_Write #4, size %d\n", size ); + if (ret == -1) { if (errno == EWOULDBLOCK) @@ -747,6 +755,8 @@ int GSocket_Write(GSocket *socket, const char *buffer, int size) return -1; } + printf( "GSocket_Write #5, size %d ret %d\n", size, ret ); + return ret; }