corrected error with SIGPIPE signal

This commit is contained in:
cvs
2000-06-07 10:49:08 +00:00
parent eeeb82fedf
commit 34d407be43
2 changed files with 1 additions and 3 deletions

View File

@ -124,10 +124,8 @@ int CocTryCmd(CocConn *conn) {
}
ERR_SI(send(conn->fd, conn->cmdbuf->buf, conn->cmdbuf->wrpos, 0));
ERR_I(CocRecv(conn->fd, conn->resbuf));
signal(SIGPIPE, SIG_DFL);
return(0);
OnError:
signal(SIGPIPE, SIG_DFL);
if (ErrCode==ECONNRESET || ErrCode==EPIPE) return(-2);
return(iret);
}

View File

@ -660,7 +660,7 @@ int SetTemp(int switchOn) {
ERR_P(LscCmd(ser, "CSET 1:[chan],1,1,0;RANGE:0;SETP 1:0"));
} else if (remoteMode==1) { /* in local mode: do not switch on heater */
ERR_P(LscCmd(ser, "SETP 1:[tempH]"));
} else if (switchOn) {
} else if (switchOn || (htrst>=5 && relay==0)) { /* switch on also when bad heater message and no alarms */
ERR_P(LscCmd(ser, "CSET 1:[chan],1,1,0;RANGE:[iRange];SETP 1:[tempH]"));
} else {
ERR_P(LscCmd(ser, "CSET 1:[chan],1;SETP 1:[tempH]"));