*/
/*-
- From: Arne Ansper <arne@cyber.ee>
+ From: Arne Ansper
Why BIO_f_reliable?
} BIO_OK_CTX;
static const BIO_METHOD methods_ok = {
- BIO_TYPE_CIPHER, "reliable",
+ BIO_TYPE_CIPHER,
+ "reliable",
/* TODO: Convert to new style write function */
bwrite_conv,
ok_write,
const BIO_METHOD *BIO_f_reliable(void)
{
- return (&methods_ok);
+ return &methods_ok;
}
static int ok_new(BIO *bi)
ret = inl;
if ((ctx == NULL) || (next == NULL) || (BIO_get_init(b) == 0))
- return (0);
+ return 0;
if (ctx->sigio && !sig_out(b))
return 0;
BIO_copy_next_retry(b);
if (!BIO_should_retry(b))
ctx->cont = 0;
- return (i);
+ return i;
}
ctx->buf_off += i;
n -= i;
}
if ((in == NULL) || (inl <= 0))
- return (0);
+ return 0;
n = (inl + ctx->buf_len > OK_BLOCK_SIZE + OK_BLOCK_BLOCK) ?
(int)(OK_BLOCK_SIZE + OK_BLOCK_BLOCK - ctx->buf_len) : inl;
BIO_clear_retry_flags(b);
BIO_copy_next_retry(b);
- return (ret);
+ return ret;
}
static long ok_ctrl(BIO *b, int cmd, long num, void *ptr)