mirror of
https://github.com/0intro/conterm
synced 2024-11-24 22:59:36 +03:00
cpu: fix p9any v.2 negotiation
This commit is contained in:
parent
a568eea78d
commit
7211f00b30
5
cpu.c
5
cpu.c
@ -560,6 +560,7 @@ p9any(int fd)
|
||||
|
||||
if((afd = open("/mnt/factotum/ctl", ORDWR)) >= 0)
|
||||
return p9anyfactotum(fd, afd);
|
||||
werrstr("");
|
||||
|
||||
if(readstr(fd, buf, sizeof buf) < 0)
|
||||
fatal(1, "cannot read p9any negotiation");
|
||||
@ -582,8 +583,8 @@ p9any(int fd)
|
||||
if(write(fd, buf2, strlen(buf2)+1) != strlen(buf2)+1)
|
||||
fatal(1, "cannot write user/domain choice in p9any");
|
||||
if(v2){
|
||||
if(readstr(fd, buf, sizeof buf) != 3)
|
||||
fatal(1, "cannot read OK in p9any");
|
||||
if(readstr(fd, buf, sizeof buf) < 0)
|
||||
fatal(1, "cannot read OK in p9any: got %d %s", n, buf);
|
||||
if(memcmp(buf, "OK\0", 3) != 0)
|
||||
fatal(1, "did not get OK in p9any");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user