Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 6ce55e9f authored by deuce's avatar deuce

Continue writing on signals and EAGAIN

parent d6a6aefc
......@@ -67,6 +67,7 @@
#include <sys/ioctl.h>
#include <signal.h>
#include <termios.h>
#include <errno.h>
#endif
#include "ODCore.h"
#include "ODGen.h"
......@@ -3452,8 +3453,20 @@ try_again:
if(select(2,NULL,&fdset,NULL,&tv) != 1)
return(kODRCGeneralFailure);
if((send_ret=write(1,pbtBuffer,nSize-pos))<1)
send_ret=write(1,pbtBuffer,nSize-pos);
if(send_ret==0)
return (kODRCGeneralFailure);
if(send_ret==-1) {
switch(errno) {
case EINTR:
case EAGAIN:
od_sleep(1);
send_ret=0;
break;
default:
return (kODRCGeneralFailure);
}
}
oldpos=pos;
pos+=send_ret;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment