@@ -799,7 +799,9 @@ int xmpp_connect_component(xmpp_conn_t *conn,
799799 return XMPP_EINVOP ;
800800
801801 /* XEP-0114 does not support TLS */
802- xmpp_conn_disable_tls (conn );
802+ long flags = xmpp_conn_get_flags (conn );
803+ flags |= XMPP_CONN_FLAG_DISABLE_TLS ;
804+ (void )xmpp_conn_set_flags (conn , flags );
803805 if (!conn -> tls_disabled ) {
804806 strophe_error (conn -> ctx , "conn" ,
805807 "Failed to disable TLS. "
@@ -1203,25 +1205,6 @@ int xmpp_conn_set_flags(xmpp_conn_t *conn, long flags)
12031205 return 0 ;
12041206}
12051207
1206- /** Disable TLS for this connection, called by users of the library.
1207- * Occasionally a server will be misconfigured to send the starttls
1208- * feature, but will not support the handshake.
1209- *
1210- * @param conn a Strophe connection object
1211- *
1212- * @note this function is deprecated
1213- * @see xmpp_conn_set_flags()
1214- *
1215- * @ingroup Connections
1216- */
1217- void xmpp_conn_disable_tls (xmpp_conn_t * conn )
1218- {
1219- long flags = xmpp_conn_get_flags (conn );
1220-
1221- flags |= XMPP_CONN_FLAG_DISABLE_TLS ;
1222- (void )xmpp_conn_set_flags (conn , flags );
1223- }
1224-
12251208/** Return whether TLS session is established or not.
12261209 *
12271210 * @return TRUE if TLS session is established and FALSE otherwise
0 commit comments