summaryrefslogtreecommitdiffstats
path: root/ssl/d1_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssl/d1_lib.c')
-rw-r--r--ssl/d1_lib.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/ssl/d1_lib.c b/ssl/d1_lib.c
index 7fb9b96d1d..0ada7edf77 100644
--- a/ssl/d1_lib.c
+++ b/ssl/d1_lib.c
@@ -115,6 +115,12 @@ int dtls1_new(SSL *s)
static void dtls1_clear_queues(SSL *s)
{
+ dtls1_clear_received_buffer(s);
+ dtls1_clear_sent_buffer(s);
+}
+
+void dtls1_clear_received_buffer(SSL *s)
+{
pitem *item = NULL;
hm_fragment *frag = NULL;
@@ -123,6 +129,12 @@ static void dtls1_clear_queues(SSL *s)
dtls1_hm_fragment_free(frag);
pitem_free(item);
}
+}
+
+void dtls1_clear_sent_buffer(SSL *s)
+{
+ pitem *item = NULL;
+ hm_fragment *frag = NULL;
while ((item = pqueue_pop(s->d1->sent_messages)) != NULL) {
frag = (hm_fragment *)item->data;
@@ -131,6 +143,7 @@ static void dtls1_clear_queues(SSL *s)
}
}
+
void dtls1_free(SSL *s)
{
DTLS_RECORD_LAYER_free(&s->rlayer);
@@ -325,7 +338,7 @@ void dtls1_stop_timer(SSL *s)
BIO_ctrl(SSL_get_rbio(s), BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT, 0,
&(s->d1->next_timeout));
/* Clear retransmission buffer */
- dtls1_clear_record_buffer(s);
+ dtls1_clear_sent_buffer(s);
}
int dtls1_check_timeout_num(SSL *s)