conn: implemented xmpp_connect_raw()
This function is similar to xmpp_connect_client(), but doesn't perform authentication. Instead, it calls user's connection handler immediately after establishing the connection. Hence, user can implement own authendication or registration procedures. Such a "raw" connection can be useful when user interaction is required (e.g. Data Forms in XEP-0077, OAuth2).
This commit is contained in:
13
src/event.c
13
src/event.c
@@ -267,18 +267,7 @@ void xmpp_run_once(xmpp_ctx_t *ctx, const unsigned long timeout)
|
||||
|
||||
conn->state = XMPP_STATE_CONNECTED;
|
||||
xmpp_debug(ctx, "xmpp", "connection successful");
|
||||
|
||||
if (conn->tls_legacy_ssl) {
|
||||
xmpp_debug(ctx, "xmpp", "using legacy SSL connection");
|
||||
ret = conn_tls_start(conn);
|
||||
if (ret != 0) {
|
||||
conn_disconnect(conn);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* send stream init */
|
||||
conn_open_stream(conn);
|
||||
conn_established(conn);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user