Commit f77b95b5 authored by Pekka Pessi's avatar Pekka Pessi

tport_tls.c: restored code that ignores SIGPIPE.

OpenSSL unignores SIGPIPE?

darcs-hash:20070202180843-65a35-77caf082e11ed53aef66015cd118cd084b0bbb5c.gz
parent df43a936
......@@ -56,6 +56,10 @@
#include <stdlib.h>
#include <string.h>
#if HAVE_SIGPIPE
#include <signal.h>
#endif
#include "tport_tls.h"
char const tls_version[] = OPENSSL_VERSION_TEXT;
......@@ -161,6 +165,11 @@ int tls_init_context(tls_t *tls, tls_issues_t const *ti)
}
}
#if HAVE_SIGPIPE
/* Avoid possible SIGPIPE when sending close_notify */
signal(SIGPIPE, SIG_IGN);
#endif
if (tls->bio_err == NULL)
tls->bio_err = BIO_new_fp(stderr, BIO_NOCLOSE);
......@@ -291,6 +300,10 @@ tls_t *tls_init_master(tls_issues_t *ti)
unsigned char sessionId[32] = "sofia/tls";
tls_t *tls;
#if HAVE_SIGPIPE
signal(SIGPIPE, SIG_IGN); /* Ignore spurios SIGPIPE from OpenSSL */
#endif
tls_set_default(ti);
if (!(tls = tls_create(tls_master)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment