From 3eb6e144fcf8b4b4c3e44d06481e1032aeac894d Mon Sep 17 00:00:00 2001 From: sq5bpf Date: Fri, 29 Dec 2023 21:27:50 +0100 Subject: [PATCH] minor fixes --- k5prog.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/k5prog.c b/k5prog.c index fbe8346..4568c9d 100644 --- a/k5prog.c +++ b/k5prog.c @@ -232,7 +232,7 @@ int read_timeout(int fd, unsigned char *buf, int maxlen, int timeout) if (ret==0) { if(timeout) /* Only print if we requested a timeout */ fprintf(stderr,"read_timeout\n"); - /* error albo timeout */ + /* error or timeout */ break; } @@ -438,8 +438,8 @@ struct k5_command *k5_receive(int fd,int tmout) { fprintf(stderr,"k5_receive: bad magic number\n"); /* Assume we are out of sync and flush rx buffer by reading everything. * This works because the boot message is repeated. */ - while(len > 0) - len =read_timeout(fd,(unsigned char *)&buf,sizeof(buf),0); + whilei (len>0) + len =read_timeout(fd,(unsigned char *)&buf,sizeof(buf),10000); return(0); }