@@ -56,7 +56,8 @@ void *BatteryThreadProc(__attribute__((__unused__)) void *args) {
5656 }
5757
5858 if (Send (BATTERY_REQ , CSTR_LEN (BATTERY_REQ ), socket ) <= 0 ) {
59- errprint ("error sending battery status request\n" );
59+ errprint ("error sending battery status request: (%d) '%s'\n" ,
60+ errno , strerror (errno ));
6061 goto LOOP ;
6162 }
6263
@@ -125,6 +126,7 @@ void *VideoThreadProc(void *args) {
125126
126127 len = snprintf (buf , sizeof (buf ), VIDEO_REQ , decoder_get_video_width (), decoder_get_video_height ());
127128 if (Send (buf , len , videoSocket ) <= 0 ){
129+ errprint ("send error (%d) '%s'\n" , errno , strerror (errno ));
128130 MSG_ERROR ("Error sending request, DroidCam might be busy with another client." );
129131 goto early_out ;
130132 }
@@ -245,12 +247,14 @@ void *AudioThreadProc(void *arg) {
245247 }
246248
247249 if (Send (AUDIO_REQ , CSTR_LEN (AUDIO_REQ ), socket ) <= 0 ) {
250+ errprint ("send error (audio) (%d) '%s'\n" , errno , strerror (errno ));
248251 MSG_ERROR ("Error sending audio request" );
249252 goto early_out ;
250253 }
251254
252255 memset (stream_buf , 0 , 6 );
253256 if (RecvAll (stream_buf , 6 , socket ) <= 0 ) {
257+ errprint ("recv error (audio) (%d) '%s'\n" , errno , strerror (errno ));
254258 MSG_ERROR ("Audio connection reset!" );
255259 goto early_out ;
256260 }
@@ -277,7 +281,10 @@ void *AudioThreadProc(void *arg) {
277281 int len = (mode == UDP_STREAM )
278282 ? RecvNonBlockUDP (stream_buf , STREAM_BUF_SIZE , socket )
279283 : RecvNonBlock (stream_buf , STREAM_BUF_SIZE , socket );
280- if (len < 0 ) { goto early_out ; }
284+ if (len < 0 ) {
285+ errprint ("recv error (audio) (%d) '%s'\n" , errno , strerror (errno ));
286+ goto early_out ;
287+ }
281288
282289 if (len > 0 ) {
283290 // dbgprint("recv %d frames\n", (len / DROIDCAM_SPX_CHUNK_BYTES_2));
0 commit comments