signalwareltd / rtl_tcp_andro-

rtl_tcp and libusb-1.0 port for Android modified to support opening devices from Linux file descriptors
GNU General Public License v2.0
339 stars 119 forks source link

Get Error in welle.io #22

Open MkMunich opened 6 years ago

MkMunich commented 6 years ago

Hi, I'm using welle.io on Android and after some time I get this error message: "SdrTcp: serveClient cannot send to client" This is issued in sdrtcp.c at line 148. To me it looks like that the return code of select() in line 139 is not handled correctly. According the manual pages the select function returns the total number of socket handles that are ready and contained in the fd_set structures, zero if the time limit expired, or SOCKET_ERROR (-1) if an error occurred. If the return value is SOCKET_ERROR, WSAGetLastError (errno) can be used to retrieve a specific error code....

Shouldn't line 141 the be the following? if(r > 0 && obj->state == STAGE_CLIENT_SERVING) {.... and the if-block in line 147-150 inside of the previous if(), so before line 145?

Please have a look.