Mercurial > pidgin
changeset 29925:ebe57b897807
merge of '02af4cf0f33f9ec7d46a52cba0e6c4349f0d6e19'
and '787e2678ecb0b07e64cbe6ae055962cd65acaeba'
author | John Bailey <rekkanoryo@rekkanoryo.org> |
---|---|
date | Thu, 13 May 2010 05:03:30 +0000 |
parents | 4b3bad9ca939 (current diff) c3015cf1dfc0 (diff) |
children | 3d8840b96727 |
files | |
diffstat | 5 files changed, 23 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/gg/lib/common.c Wed May 12 14:07:02 2010 +0000 +++ b/libpurple/protocols/gg/lib/common.c Thu May 13 05:03:30 2010 +0000 @@ -101,7 +101,7 @@ * \param format Format wiadomości (zgodny z \c printf) * \param ap Lista argumentów (zgodna z \c printf) */ -static void gg_debug_common(struct gg_session *sess, int level, const char *format, va_list ap) +void gg_debug_common(struct gg_session *sess, int level, const char *format, va_list ap) { if (gg_debug_handler_session) (*gg_debug_handler_session)(sess, level, format, ap);
--- a/libpurple/protocols/gg/lib/libgadu-internal.h Wed May 12 14:07:02 2010 +0000 +++ b/libpurple/protocols/gg/lib/libgadu-internal.h Thu May 13 05:03:30 2010 +0000 @@ -26,5 +26,6 @@ char *gg_cp_to_utf8(const char *b); char *gg_utf8_to_cp(const char *b); int gg_pubdir50_handle_reply_sess(struct gg_session *sess, struct gg_event *e, const char *packet, int length); +void gg_debug_common(struct gg_session *sess, int level, const char *format, va_list ap); #endif /* LIBGADU_INTERNAL_H */
--- a/libpurple/protocols/gg/lib/libgadu.h Wed May 12 14:07:02 2010 +0000 +++ b/libpurple/protocols/gg/lib/libgadu.h Thu May 13 05:03:30 2010 +0000 @@ -1245,8 +1245,8 @@ struct gg_http *gg_change_passwd3(uin_t uin, const char *passwd, const char *newpasswd, const char *qa, int async) GG_DEPRECATED; int gg_resolve(int *fd, int *pid, const char *hostname) GG_DEPRECATED; +int gg_resolve_pthread(int *fd, void **resolver, const char *hostname) GG_DEPRECATED; void gg_resolve_pthread_cleanup(void *arg, int kill) GG_DEPRECATED; -int gg_resolve_pthread(int *fd, void **resolver, const char *hostname) GG_DEPRECATED; struct gg_change_info_request { char *first_name;
--- a/libpurple/protocols/jabber/message.c Wed May 12 14:07:02 2010 +0000 +++ b/libpurple/protocols/jabber/message.c Thu May 13 05:03:30 2010 +0000 @@ -75,12 +75,8 @@ jbr = jabber_buddy_find_resource(jb, jid->resource); if(!jm->xhtml && !jm->body) { - if (jbr) { - if (jm->chat_state != JM_STATE_NONE) - jbr->chat_states = JABBER_CHAT_STATES_SUPPORTED; - else - jbr->chat_states = JABBER_CHAT_STATES_UNSUPPORTED; - } + if (jbr && jm->chat_state != JM_STATE_NONE) + jbr->chat_states = JABBER_CHAT_STATES_SUPPORTED; if(JM_STATE_COMPOSING == jm->chat_state) { serv_got_typing(gc, jm->from, 0, PURPLE_TYPING); @@ -142,10 +138,13 @@ } if(jbr) { - if (jm->chat_state != JM_STATE_NONE) - jbr->chat_states = JABBER_CHAT_STATES_SUPPORTED; - else - jbr->chat_states = JABBER_CHAT_STATES_UNSUPPORTED; + /* Treat SUPPORTED as a terminal with no escape :) */ + if (jbr->chat_states != JABBER_CHAT_STATES_SUPPORTED) { + if (jm->chat_state != JM_STATE_NONE) + jbr->chat_states = JABBER_CHAT_STATES_SUPPORTED; + else + jbr->chat_states = JABBER_CHAT_STATES_UNSUPPORTED; + } if(jbr->thread_id) g_free(jbr->thread_id); @@ -1250,7 +1249,14 @@ g_free(resource); - if (!jbr || (jbr->chat_states == JABBER_CHAT_STATES_UNSUPPORTED)) + /* We know this entity doesn't support chat states */ + if (jbr && jbr->chat_states == JABBER_CHAT_STATES_UNSUPPORTED) + return 0; + + /* *If* we don't have presence /and/ the buddy can't see our + * presence, don't send typing notifications. + */ + if (!jbr && !(jb->subscription & JABBER_SUB_FROM)) return 0; /* TODO: figure out threading */
--- a/libpurple/protocols/msn/slplink.c Wed May 12 14:07:02 2010 +0000 +++ b/libpurple/protocols/msn/slplink.c Thu May 13 05:03:30 2010 +0000 @@ -383,6 +383,7 @@ msn_slplink_release_slpmsg(MsnSlpLink *slplink, MsnSlpMessage *slpmsg) { MsnMessage *msg; + const char *passport; slpmsg->msg = msg = msn_message_new_msnslp(); @@ -421,7 +422,8 @@ msg->msnslp_header.total_size = slpmsg->size; - msn_message_set_attr(msg, "P2P-Dest", slplink->remote_user); + passport = purple_normalize(slplink->session->account, slplink->remote_user); + msn_message_set_attr(msg, "P2P-Dest", passport); msg->ack_cb = msg_ack; msg->nak_cb = msg_nak;