diff options
author | James Booth <boothj5@gmail.com> | 2015-05-07 23:16:22 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-05-07 23:16:22 +0100 |
commit | a2281dbccf9d1973e750f7b0ad72d132ed5c4fac (patch) | |
tree | c5b25a224156b7c014af502281222b9d1a19495f /src/xmpp | |
parent | beeadd6ae3dc1635b0d7642cb699c89e2a4f537e (diff) | |
parent | 56cbce2ff3d1d1de4f3cd1661a719773c0c915f0 (diff) | |
download | profani-tty-a2281dbccf9d1973e750f7b0ad72d132ed5c4fac.tar.gz |
Merge branch 'master' into openpgp
Diffstat (limited to 'src/xmpp')
-rw-r--r-- | src/xmpp/presence.c | 13 | ||||
-rw-r--r-- | src/xmpp/roster.c | 2 | ||||
-rw-r--r-- | src/xmpp/xmpp.h | 2 |
3 files changed, 6 insertions, 11 deletions
diff --git a/src/xmpp/presence.c b/src/xmpp/presence.c index 0a7b5c45..ba2af538 100644 --- a/src/xmpp/presence.c +++ b/src/xmpp/presence.c @@ -196,8 +196,7 @@ presence_reset_sub_request_search(void) } void -presence_update(const resource_presence_t presence_type, const char * const msg, - const int idle) +presence_send(const resource_presence_t presence_type, const char * const msg, const int idle) { if (jabber_get_connection_status() != JABBER_CONNECTED) { log_warning("Error setting presence, not connected."); @@ -205,18 +204,14 @@ presence_update(const resource_presence_t presence_type, const char * const msg, } if (msg) { - log_debug("Updating presence: %s, \"%s\"", - string_from_resource_presence(presence_type), msg); + log_debug("Updating presence: %s, \"%s\"", string_from_resource_presence(presence_type), msg); } else { - log_debug("Updating presence: %s", - string_from_resource_presence(presence_type)); + log_debug("Updating presence: %s", string_from_resource_presence(presence_type)); } xmpp_ctx_t * const ctx = connection_get_ctx(); xmpp_conn_t * const conn = connection_get_conn(); - const int pri = - accounts_get_priority_for_presence_type(jabber_get_account_name(), - presence_type); + const int pri = accounts_get_priority_for_presence_type(jabber_get_account_name(), presence_type); const char *show = stanza_get_presence_string_from_type(presence_type); connection_set_presence_message(msg); diff --git a/src/xmpp/roster.c b/src/xmpp/roster.c index 2f2bc77f..9ee4ec86 100644 --- a/src/xmpp/roster.c +++ b/src/xmpp/roster.c @@ -331,7 +331,7 @@ _roster_result_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, v sv_ev_roster_received(); resource_presence_t conn_presence = accounts_get_login_presence(jabber_get_account_name()); - presence_update(conn_presence, NULL, 0); + presence_send(conn_presence, NULL, 0); return 1; } diff --git a/src/xmpp/xmpp.h b/src/xmpp/xmpp.h index 1dc0c131..398c9f46 100644 --- a/src/xmpp/xmpp.h +++ b/src/xmpp/xmpp.h @@ -168,7 +168,7 @@ char * presence_sub_request_find(const char * const search_str); void presence_join_room(char *room, char *nick, char * passwd); void presence_change_room_nick(const char * const room, const char * const nick); void presence_leave_chat_room(const char * const room_jid); -void presence_update(resource_presence_t status, const char * const msg, +void presence_send(resource_presence_t status, const char * const msg, int idle); gboolean presence_sub_request_exists(const char * const bare_jid); |