mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Remove redundant tls secured function
This commit is contained in:
parent
c009144b3d
commit
81e95966cf
@ -232,7 +232,7 @@ cmd_tls_trust(ProfWin *window, const char *const command, gchar **args)
|
||||
cons_show("You are not currently connected.");
|
||||
return TRUE;
|
||||
}
|
||||
if (!connection_conn_is_secured()) {
|
||||
if (!connection_is_secured()) {
|
||||
cons_show("No TLS connection established");
|
||||
return TRUE;
|
||||
}
|
||||
@ -330,7 +330,7 @@ cmd_tls_cert(ProfWin *window, const char *const command, gchar **args)
|
||||
cons_show("You are not currently connected.");
|
||||
return TRUE;
|
||||
}
|
||||
if (!connection_conn_is_secured()) {
|
||||
if (!connection_is_secured()) {
|
||||
cons_show("No TLS connection established");
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -61,7 +61,7 @@
|
||||
#include "ui/ui.h"
|
||||
|
||||
void
|
||||
sv_ev_login_account_success(char *account_name, int secured)
|
||||
sv_ev_login_account_success(char *account_name, gboolean secured)
|
||||
{
|
||||
ProfAccount *account = accounts_get_account(account_name);
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
||||
|
||||
#include "xmpp/xmpp.h"
|
||||
|
||||
void sv_ev_login_account_success(char *account_name, int secured);
|
||||
void sv_ev_login_account_success(char *account_name, gboolean secured);
|
||||
void sv_ev_lost_connection(void);
|
||||
void sv_ev_failed_login(void);
|
||||
void sv_ev_room_invite(jabber_invite_t invite_type,
|
||||
|
@ -472,7 +472,7 @@ cons_check_version(gboolean not_available_msg)
|
||||
}
|
||||
|
||||
void
|
||||
cons_show_login_success(ProfAccount *account, int secured)
|
||||
cons_show_login_success(ProfAccount *account, gboolean secured)
|
||||
{
|
||||
ProfWin *console = wins_get_console();
|
||||
win_vprint(console, '-', 0, NULL, NO_EOL, 0, "", "%s logged in successfully, ", account->jid);
|
||||
|
@ -352,7 +352,7 @@ ui_group_removed(const char *const contact, const char *const group)
|
||||
}
|
||||
|
||||
void
|
||||
ui_handle_login_account_success(ProfAccount *account, int secured)
|
||||
ui_handle_login_account_success(ProfAccount *account, gboolean secured)
|
||||
{
|
||||
if (account->theme) {
|
||||
if (theme_load(account->theme)) {
|
||||
@ -378,7 +378,7 @@ ui_handle_login_account_success(ProfAccount *account, int secured)
|
||||
cons_show_login_success(account, secured);
|
||||
title_bar_set_presence(contact_presence);
|
||||
title_bar_set_connected(TRUE);
|
||||
title_bar_set_tls(secured ? TRUE : FALSE);
|
||||
title_bar_set_tls(secured);
|
||||
|
||||
GString *fulljid = g_string_new(account->jid);
|
||||
g_string_append(fulljid, "/");
|
||||
|
@ -118,7 +118,7 @@ void ui_show_software_version(const char *const jid, const char *const presence
|
||||
const char *const version, const char *const os);
|
||||
void ui_prune_wins(void);
|
||||
void ui_auto_away(char *message, gint time, resource_presence_t res_presence);
|
||||
void ui_handle_login_account_success(ProfAccount *account, int secured);
|
||||
void ui_handle_login_account_success(ProfAccount *account, gboolean secured);
|
||||
void ui_update_presence(const resource_presence_t resource_presence, const char *const message, const char *const show);
|
||||
void ui_write(char *line, int offset);
|
||||
void ui_invalid_command_usage(const char *const cmd, void (*setting_func)(void));
|
||||
@ -260,7 +260,7 @@ void cons_show_themes(GSList *themes);
|
||||
void cons_show_scripts(GSList *scripts);
|
||||
void cons_show_script(const char *const script, GSList *commands);
|
||||
void cons_show_aliases(GList *aliases);
|
||||
void cons_show_login_success(ProfAccount *account, int secured);
|
||||
void cons_show_login_success(ProfAccount *account, gboolean secured);
|
||||
void cons_show_software_version(const char *const jid, const char *const presence, const char *const name,
|
||||
const char *const version, const char *const os);
|
||||
void cons_show_account_list(gchar **accounts);
|
||||
|
@ -281,12 +281,6 @@ connection_set_domain(char *domain)
|
||||
conn.domain = strdup(domain);
|
||||
}
|
||||
|
||||
int
|
||||
connection_is_secured(void)
|
||||
{
|
||||
return xmpp_conn_is_secured(conn.conn);
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBMESODE
|
||||
TLSCertificate*
|
||||
connection_get_tls_peer_cert(void)
|
||||
@ -312,7 +306,7 @@ connection_get_tls_peer_cert(void)
|
||||
#endif
|
||||
|
||||
gboolean
|
||||
connection_conn_is_secured(void)
|
||||
connection_is_secured(void)
|
||||
{
|
||||
if (conn.conn_status == JABBER_CONNECTED) {
|
||||
return xmpp_conn_is_secured(conn.conn) == 0 ? FALSE : TRUE;
|
||||
|
@ -49,8 +49,6 @@ void connection_set_presence_msg(const char *const message);
|
||||
void connection_set_priority(const int priority);
|
||||
void connection_set_domain(char *domain);
|
||||
|
||||
int connection_is_secured(void);
|
||||
|
||||
void connection_free_conn(void);
|
||||
void connection_free_ctx(void);
|
||||
void connection_free_presence_msg(void);
|
||||
|
@ -327,7 +327,7 @@ session_remove_available_resource(const char *const resource)
|
||||
}
|
||||
|
||||
void
|
||||
session_login_success(int secured)
|
||||
session_login_success(gboolean secured)
|
||||
{
|
||||
// logged in with account
|
||||
if (saved_account.name) {
|
||||
|
@ -46,7 +46,7 @@
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
void session_login_success(int secured);
|
||||
void session_login_success(gboolean secured);
|
||||
void session_login_failed(void);
|
||||
void session_lost_connection(void);
|
||||
GSList* session_get_disco_items(void);
|
||||
|
@ -130,7 +130,7 @@ void connection_free_uuid(char *uuid);
|
||||
#ifdef HAVE_LIBMESODE
|
||||
TLSCertificate* connection_get_tls_peer_cert(void);
|
||||
#endif
|
||||
gboolean connection_conn_is_secured(void);
|
||||
gboolean connection_is_secured(void);
|
||||
gboolean connection_send_stanza(const char *const stanza);
|
||||
|
||||
char* message_send_chat(const char *const barejid, const char *const msg, const char *const oob_url);
|
||||
|
@ -37,7 +37,7 @@ const char * session_get_domain(void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
gboolean connection_conn_is_secured(void)
|
||||
gboolean connection_is_secured(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user