From: Nikos Mavrogiannopoulos Date: Mon, 4 Feb 2013 01:51:26 +0000 (+0100) Subject: only register heartbeat if it is enabled. X-Git-Tag: gnutls_3_1_7~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1e491fe7112c597db308f9c00937fa16c954e1f;p=thirdparty%2Fgnutls.git only register heartbeat if it is enabled. --- diff --git a/lib/gnutls_extensions.c b/lib/gnutls_extensions.c index 6948836347..90a4936a8d 100644 --- a/lib/gnutls_extensions.c +++ b/lib/gnutls_extensions.c @@ -336,9 +336,11 @@ _gnutls_ext_init (void) return ret; #endif +#ifdef ENABLE_HEARTBEAT ret = _gnutls_ext_register (&ext_mod_heartbeat); if (ret != GNUTLS_E_SUCCESS) return ret; +#endif ret = _gnutls_ext_register (&ext_mod_new_record_padding); if (ret != GNUTLS_E_SUCCESS) diff --git a/lib/gnutls_record.c b/lib/gnutls_record.c index f5ef398223..edbdbf7dd2 100644 --- a/lib/gnutls_record.c +++ b/lib/gnutls_record.c @@ -674,9 +674,11 @@ record_add_to_buffers (gnutls_session_t session, break; +#ifdef ENABLE_HEARTBEAT case GNUTLS_HEARTBEAT: ret = _gnutls_heartbeat_handle (session, bufel); goto cleanup; +#endif case GNUTLS_APPLICATION_DATA: if (session->internals.initial_negotiation_completed == 0)