diff options
author | Matt Caswell <matt@openssl.org> | 2015-01-30 13:46:43 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-03-26 13:53:07 +0000 |
commit | 52e1d7b152a92d4fc2c3704a0129ec0ee0ce5e21 (patch) | |
tree | 3a9ee6dfbcd3c69a496c42d2d0aed810433f1858 /ssl/ssl_lib.c | |
parent | 8e3f0c988fabf60b65f7109b7f47daec0fde9c39 (diff) |
Create a RECORD_LAYER structure and move read_ahead into it.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'ssl/ssl_lib.c')
-rw-r--r-- | ssl/ssl_lib.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 0b2d8de612..af31831aec 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -301,7 +301,7 @@ SSL *SSL_new(SSL_CTX *ctx) if (s->cert == NULL) goto err; - s->read_ahead = ctx->read_ahead; + RECORD_LAYER_set_read_ahead(&s->rlayer, ctx->read_ahead); s->msg_callback = ctx->msg_callback; s->msg_callback_arg = ctx->msg_callback_arg; s->verify_mode = ctx->verify_mode; @@ -821,12 +821,12 @@ void SSL_set_verify_depth(SSL *s, int depth) void SSL_set_read_ahead(SSL *s, int yes) { - s->read_ahead = yes; + RECORD_LAYER_set_read_ahead(&s->rlayer, yes); } int SSL_get_read_ahead(const SSL *s) { - return (s->read_ahead); + return RECORD_LAYER_get_read_ahead(&s->rlayer); } int SSL_pending(const SSL *s) @@ -1063,10 +1063,10 @@ long SSL_ctrl(SSL *s, int cmd, long larg, void *parg) switch (cmd) { case SSL_CTRL_GET_READ_AHEAD: - return (s->read_ahead); + return (RECORD_LAYER_get_read_ahead(&s->rlayer)); case SSL_CTRL_SET_READ_AHEAD: - l = s->read_ahead; - s->read_ahead = larg; + l = RECORD_LAYER_get_read_ahead(&s->rlayer); + RECORD_LAYER_set_read_ahead(&s->rlayer, larg); return (l); case SSL_CTRL_SET_MSG_CALLBACK_ARG: |