From 77d514c5a00511017967f98b03a946d86c923e94 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Mon, 9 Mar 2015 15:33:46 +0000 Subject: 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 --- ssl/d1_lib.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'ssl/d1_lib.c') 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) -- cgit v1.2.3