return;
ret = send_buffer(ct->rc4c.fd, buf);
if (ret < 0)
- goto err;
+ goto out;
ct->status = CL_SENT_AUTH;
return;
case CL_SENT_AUTH:
ret = para_decrypt_buffer(ct->key_file, crypt_buf,
(unsigned char *)buf, n);
if (ret < 0)
- goto err;
+ goto out;
sha1_hash((char *)crypt_buf, CHALLENGE_SIZE, challenge_sha1);
RC4_set_key(&ct->rc4c.send_key, RC4_KEY_LEN,
crypt_buf + CHALLENGE_SIZE);
ret = send_bin_buffer(ct->rc4c.fd, (char *)challenge_sha1,
HASH_SIZE);
if (ret < 0)
- goto err;
+ goto out;
ct->status = CL_SENT_CH_RESPONSE;
return;
}
ret = rc4_send_buffer(&ct->rc4c, command);
free(command);
if (ret < 0)
- goto err;
+ goto out;
ct->status = CL_SENT_COMMAND;
return;
}
size_t sz;
ret = btr_node_status(btrn, 0, BTR_NT_LEAF);
if (ret < 0)
- goto err;
+ goto out;
if (ret == 0)
return;
if (!FD_ISSET(ct->rc4c.fd, &s->wfds))
sz = btr_next_buffer(btrn, &buf2);
ret = rc4_send_bin_buffer(&ct->rc4c, buf2, sz);
if (ret < 0)
- goto err;
+ goto out;
btr_consume(btrn, sz);
return;
}
char *buf2;
ret = btr_node_status(btrn, 0, BTR_NT_ROOT);
if (ret < 0)
- goto err;
+ goto out;
if (ret == 0)
return;
/*
goto out;
}
}
-err:
out:
t->error = ret;
if (ret < 0) {