From c670d13369dfa57a648f9cf43b3d814cbfc78499 Mon Sep 17 00:00:00 2001 From: Jan Vidar Krey Date: Sat, 23 Jan 2010 00:20:48 +0100 Subject: [PATCH] Make sure we shutdown SSL connections when an error occurs. --- GNUmakefile | 2 +- src/network/connection.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/GNUmakefile b/GNUmakefile index fcea83e..a6618db 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -8,7 +8,7 @@ LD := $(CC) MV := mv RANLIB := ranlib CFLAGS += -pipe -Wall -USE_SSL ?= NO +USE_SSL ?= YES USE_BIGENDIAN ?= AUTO BITS ?= AUTO SILENT ?= YES diff --git a/src/network/connection.c b/src/network/connection.c index 59c3795..f53f0b2 100644 --- a/src/network/connection.c +++ b/src/network/connection.c @@ -279,6 +279,10 @@ void net_con_callback(struct net_connection* con, int events) con->callback(con, events, con->ptr); break; + case tls_st_error: + con->callback(con, NET_EVENT_READ, con->ptr); + break; + case tls_st_accepting: if (net_con_ssl_accept(con) < 0) {