From a39267c1b0c066c9e0cec85507b8f6b7fb3e5830 Mon Sep 17 00:00:00 2001 From: Dmitry Podgorny Date: Mon, 19 Oct 2015 22:42:44 +0300 Subject: [PATCH] conn: use altport for legacy ssl if specified --- src/conn.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/conn.c b/src/conn.c index f668456..57b4736 100644 --- a/src/conn.c +++ b/src/conn.c @@ -425,9 +425,10 @@ int xmpp_connect_client(xmpp_conn_t * const conn, } if (conn->tls_legacy_ssl) { /* SSL tunneled connection on 5223 port is legacy and doesn't - * have an SRV record. Force port 5223 here. + * have an SRV record. Force port 5223 here unless altport is + * specified. */ - port = XMPP_PORT_CLIENT_LEGACY_SSL; + port = altport ? altport : XMPP_PORT_CLIENT_LEGACY_SSL; } } if (prefdomain != NULL) {