diff options
author | Matt Caswell <matt@openssl.org> | 2015-03-09 15:33:46 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-03-23 15:23:24 +0000 |
commit | 77d514c5a00511017967f98b03a946d86c923e94 (patch) | |
tree | c97b255d989acf752b31b079ca6cc0b5cd6dd290 /ssl/d1_lib.c | |
parent | ac59d70553723cd8c7c1558071a2e1672d80daef (diff) | |
download | openssl-77d514c5a00511017967f98b03a946d86c923e94.tar.gz |
ssl3_set_handshake_header returns
Change ssl_set_handshake_header from return void to returning int, and
handle error return code appropriately.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'ssl/d1_lib.c')
-rw-r--r-- | ssl/d1_lib.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ssl/d1_lib.c b/ssl/d1_lib.c index b568944ba0..437e89f011 100644 --- a/ssl/d1_lib.c +++ b/ssl/d1_lib.c @@ -67,7 +67,7 @@ #endif static void get_current_time(struct timeval *t); -static void dtls1_set_handshake_header(SSL *s, int type, unsigned long len); +static int dtls1_set_handshake_header(SSL *s, int type, unsigned long len); static int dtls1_handshake_write(SSL *s); const char dtls1_version_str[] = "DTLSv1" OPENSSL_VERSION_PTEXT; int dtls1_listen(SSL *s, struct sockaddr *client); @@ -560,18 +560,18 @@ int dtls1_listen(SSL *s, struct sockaddr *client) return 1; } -static void dtls1_set_handshake_header(SSL *s, int htype, unsigned long len) +static int dtls1_set_handshake_header(SSL *s, int htype, unsigned long len) { unsigned char *p = (unsigned char *)s->init_buf->data; dtls1_set_message_header(s, p, htype, len, 0, len); s->init_num = (int)len + DTLS1_HM_HEADER_LENGTH; s->init_off = 0; /* Buffer the message to handle re-xmits */ - /* - * Deliberately swallow error return. We really should do something with - * this - but its a void function that can't (easily) be changed - */ - if(!dtls1_buffer_message(s, 0)); + + if(!dtls1_buffer_message(s, 0)) + return 0; + + return 1; } static int dtls1_handshake_write(SSL *s) |