mirror of
https://github.com/profanity-im/profanity.git
synced 2025-02-02 15:08:15 -05:00
Free ProfAccount
This commit is contained in:
parent
d5d04756ce
commit
8633cd6e29
@ -589,9 +589,11 @@ cmd_account_default(ProfWin *window, const char *const command, gchar **args)
|
||||
}
|
||||
} else if (g_strv_length(args) == 3) {
|
||||
if (strcmp(args[1], "set") == 0) {
|
||||
if (accounts_get_account(args[2])) {
|
||||
ProfAccount *account_p = accounts_get_account(args[2]);
|
||||
if (account_p) {
|
||||
prefs_set_string(PREF_DEFAULT_ACCOUNT, args[2]);
|
||||
cons_show("Default account set to %s.", args[2]);
|
||||
account_free(account_p);
|
||||
} else {
|
||||
cons_show("Account %s does not exist.", args[2]);
|
||||
}
|
||||
|
@ -191,6 +191,7 @@ bookmark_join(const char *jid)
|
||||
account_free(account);
|
||||
} else if (muc_roster_complete(item->jid)) {
|
||||
ui_room_join(item->jid, TRUE);
|
||||
account_free(account);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -498,6 +498,7 @@ _session_reconnect(void)
|
||||
log_debug("Attempting reconnect with account %s", account->name);
|
||||
connection_connect(fulljid, saved_account.passwd, account->server, account->port, account->tls_policy);
|
||||
free(fulljid);
|
||||
account_free(account);
|
||||
g_timer_start(reconnect_timer);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user