changeset 896:b13359ace625

Condition the use of sctps_ctx with #ifndef DISABLE_SCTP
author Sebastien Decugis <sdecugis@freediameter.net>
date Fri, 30 Nov 2012 23:04:16 +0100
parents fbf77629cb7b
children d8d0772586ad
files libfdcore/cnxctx.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libfdcore/cnxctx.c	Fri Nov 30 00:44:10 2012 +0100
+++ b/libfdcore/cnxctx.c	Fri Nov 30 23:04:16 2012 +0100
@@ -926,15 +926,15 @@
 /* The function that receives TLS data and re-builds a Diameter message -- it exits only on error or cancelation */
 int fd_tls_rcvthr_core(struct cnxctx * conn, gnutls_session_t session)
 {
-	struct timespec * rcv_on;
+	struct timespec * rcv_on = &conn->cc_tls_para.recvon;
 	
+#ifndef DISABLE_SCTP
 	void * ptr = gnutls_transport_get_ptr(session);
-	if (ptr == conn) {
-		rcv_on = &conn->cc_tls_para.recvon;
-	} else {
+	if (ptr != conn) {
 		struct sctps_ctx * ctx = (struct sctps_ctx *) ptr;
 		rcv_on = &ctx->recvon;
 	}
+#endif /* DISABLE_SCTP */
 	
 	
 	/* No guarantee that GnuTLS preserves the message boundaries, so we re-build it as in TCP */
"Welcome to our mercurial repository"