ident: use rb_read/rb_write instead of direct syscalls
This commit is contained in:
parent
d0ebe1bcb2
commit
dd1b211fae
1 changed files with 2 additions and 2 deletions
|
@ -539,7 +539,7 @@ auth_connect_callback(rb_fde_t *F, int error, void *data)
|
||||||
rb_snprintf(authbuf, sizeof(authbuf), "%u , %u\r\n",
|
rb_snprintf(authbuf, sizeof(authbuf), "%u , %u\r\n",
|
||||||
auth->rport, auth->lport);
|
auth->rport, auth->lport);
|
||||||
|
|
||||||
if(write(rb_get_fd(auth->F), authbuf, strlen(authbuf)) == -1)
|
if(rb_write(auth->F, authbuf, strlen(authbuf)) != strlen(authbuf))
|
||||||
{
|
{
|
||||||
auth_error(auth);
|
auth_error(auth);
|
||||||
return;
|
return;
|
||||||
|
@ -568,7 +568,7 @@ read_auth_reply(rb_fde_t *F, void *data)
|
||||||
int count;
|
int count;
|
||||||
char buf[AUTH_BUFSIZ + 1]; /* buffer to read auth reply into */
|
char buf[AUTH_BUFSIZ + 1]; /* buffer to read auth reply into */
|
||||||
|
|
||||||
len = read(rb_get_fd(F), buf, AUTH_BUFSIZ);
|
len = rb_read(F, buf, AUTH_BUFSIZ);
|
||||||
|
|
||||||
if(len < 0 && rb_ignore_errno(errno))
|
if(len < 0 && rb_ignore_errno(errno))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue