about summary refs log tree commit diff stats
path: root/src/event
diff options
context:
space:
mode:
authorswirl <roachh@protonmail.com>2021-07-04 19:02:38 -0400
committerswirl <roachh@protonmail.com>2021-08-17 14:09:48 -0400
commit2cc354b6aef2f54b3f4dacc81f257c0625d5c734 (patch)
treeff7ff510e0ec21db07d80c5a0633370eb9564b7c /src/event
parent5ea1ccbb468bd6c1195cb85fe29ac664e74436e7 (diff)
downloadprofani-tty-2cc354b6aef2f54b3f4dacc81f257c0625d5c734.tar.gz
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
Diffstat (limited to 'src/event')
-rw-r--r--src/event/client_events.c8
-rw-r--r--src/event/client_events.h2
2 files changed, 10 insertions, 0 deletions
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
+