correct size
This commit is contained in:
parent
84edc59152
commit
493b97a4d9
1 changed files with 2 additions and 2 deletions
|
|
@ -91,12 +91,12 @@ getnetconninfo(char *dir, int fd)
|
||||||
nci->spec = unknown;
|
nci->spec = unknown;
|
||||||
if(nci->dir == nil || nci->root == nil)
|
if(nci->dir == nil || nci->root == nil)
|
||||||
goto err;
|
goto err;
|
||||||
sn = sizeof sn;
|
sn = sizeof u;
|
||||||
if(getsockname(fd, &u.sa, &sn) < 0)
|
if(getsockname(fd, &u.sa, &sn) < 0)
|
||||||
goto err;
|
goto err;
|
||||||
if(convert(fd, &u.sa, &nci->lsys, &nci->lserv, &nci->laddr) < 0)
|
if(convert(fd, &u.sa, &nci->lsys, &nci->lserv, &nci->laddr) < 0)
|
||||||
goto err;
|
goto err;
|
||||||
sn = sizeof sn;
|
sn = sizeof u;
|
||||||
if(getpeername(fd, &u.sa, &sn) < 0)
|
if(getpeername(fd, &u.sa, &sn) < 0)
|
||||||
goto err;
|
goto err;
|
||||||
if(convert(fd, &u.sa, &nci->rsys, &nci->rserv, &nci->raddr) < 0)
|
if(convert(fd, &u.sa, &nci->rsys, &nci->rserv, &nci->raddr) < 0)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue