From 2cc354b6aef2f54b3f4dacc81f257c0625d5c734 Mon Sep 17 00:00:00 2001 From: swirl Date: Sun, 4 Jul 2021 19:02:38 -0400 Subject: fixed some bugs, added some more - Added JABBER_RAW_CONNECT[ING/ED] connection states - Added cl_ev_connect_raw and session_connect_raw to conform to normal connection functions - Fixed SIGABRT during registration - Added a check in cmd_register to ensure it's actually connected before registering--but this will always fail atm --- src/event/client_events.c | 8 ++++++++ src/event/client_events.h | 2 ++ 2 files changed, 10 insertions(+) (limited to 'src/event') diff --git a/src/event/client_events.c b/src/event/client_events.c index bf519feb..14b5b8c4 100644 --- a/src/event/client_events.c +++ b/src/event/client_events.c @@ -81,6 +81,13 @@ cl_ev_connect_account(ProfAccount* account) return session_connect_with_account(account); } +jabber_conn_status_t +cl_ev_connect_raw(const char* const altdomain, const int port, const char* const tls_policy, const char* const auth_policy) +{ + cons_show("Raw connecting to %s", altdomain); + return session_connect_raw(altdomain, port, tls_policy, auth_policy); +} + void cl_ev_disconnect(void) { @@ -262,3 +269,4 @@ cl_ev_send_priv_msg(ProfPrivateWin* privwin, const char* const msg, const char* jid_destroy(jidp); } } + diff --git a/src/event/client_events.h b/src/event/client_events.h index fed2bb37..8fbc7a05 100644 --- a/src/event/client_events.h +++ b/src/event/client_events.h @@ -40,6 +40,7 @@ jabber_conn_status_t cl_ev_connect_jid(const char* const jid, const char* const passwd, const char* const altdomain, const int port, const char* const tls_policy, const char* const auth_policy); jabber_conn_status_t cl_ev_connect_account(ProfAccount* account); +jabber_conn_status_t cl_ev_connect_raw(const char* const altdomain, const int port, const char* const tls_policy, const char* const auth_policy); void cl_ev_disconnect(void); @@ -52,3 +53,4 @@ void cl_ev_send_muc_msg(ProfMucWin* mucwin, const char* const msg, const char* c void cl_ev_send_priv_msg(ProfPrivateWin* privwin, const char* const msg, const char* const oob_url); #endif + -- cgit 1.4.1-2-gfad0