corrected error with SIGPIPE signal
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
@ -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]"));
|
||||
|
Reference in New Issue
Block a user