diff options
Diffstat (limited to 'src/xmpp')
-rw-r--r-- | src/xmpp/connection.c | 9 | ||||
-rw-r--r-- | src/xmpp/roster.c | 2 | ||||
-rw-r--r-- | src/xmpp/xmpp.h | 5 |
3 files changed, 7 insertions, 9 deletions
diff --git a/src/xmpp/connection.c b/src/xmpp/connection.c index 40a1ea05..a1cb31c4 100644 --- a/src/xmpp/connection.c +++ b/src/xmpp/connection.c @@ -109,21 +109,20 @@ jabber_init(const int disable_tls) } jabber_conn_status_t -jabber_connect_with_account(const ProfAccount * const account, - const char * const passwd) +jabber_connect_with_account(const ProfAccount * const account) { assert(account != NULL); - assert(passwd != NULL); log_info("Connecting using account: %s", account->name); // save account name and password for reconnect saved_account.name = strdup(account->name); - saved_account.passwd = strdup(passwd); + saved_account.passwd = strdup(account->password); // connect with fulljid Jid *jidp = jid_create_from_bare_and_resource(account->jid, account->resource); - jabber_conn_status_t result = _jabber_connect(jidp->fulljid, passwd, account->server); + jabber_conn_status_t result = + _jabber_connect(jidp->fulljid, account->password, account->server); jid_destroy(jidp); return result; diff --git a/src/xmpp/roster.c b/src/xmpp/roster.c index c073464d..5fbb7be7 100644 --- a/src/xmpp/roster.c +++ b/src/xmpp/roster.c @@ -518,7 +518,7 @@ roster_barejid_from_name(const char * const name) } PContact -roster_get_contact(const char const *barejid) +roster_get_contact(const char * const barejid) { return g_hash_table_lookup(contacts, barejid); } diff --git a/src/xmpp/xmpp.h b/src/xmpp/xmpp.h index 61f07e5e..f1b3ba6c 100644 --- a/src/xmpp/xmpp.h +++ b/src/xmpp/xmpp.h @@ -78,8 +78,7 @@ typedef struct disco_identity_t { void jabber_init(const int disable_tls); jabber_conn_status_t jabber_connect_with_details(const char * const jid, const char * const passwd, const char * const altdomain); -jabber_conn_status_t jabber_connect_with_account(const ProfAccount * const account, - const char * const passwd); +jabber_conn_status_t jabber_connect_with_account(const ProfAccount * const account); void jabber_disconnect(void); void jabber_shutdown(void); void jabber_process_events(void); @@ -128,7 +127,7 @@ void caps_close(void); void roster_clear(void); gboolean roster_update_presence(const char * const barejid, Resource *resource, GDateTime *last_activity); -PContact roster_get_contact(const char const *barejid); +PContact roster_get_contact(const char * const barejid); gboolean roster_contact_offline(const char * const barejid, const char * const resource, const char * const status); void roster_reset_search_attempts(void); |