cpw.malu.xmpp.jingle_ft: 112c54f1: Actually check the caps of the selected ...
malu at pidgin.im
malu at pidgin.im
Sun May 10 16:40:27 EDT 2009
-----------------------------------------------------------------
Revision: 112c54f174ffc8d341123893a17e32542ddc17f9
Ancestor: 0aa1bd9c434d7a0e0d62cf38ab16ec317b95385c
Author: malu at pidgin.im
Date: 2009-05-10T20:39:18
Branch: im.pidgin.cpw.malu.xmpp.jingle_ft
URL: http://d.pidgin.im/viewmtn/revision/info/112c54f174ffc8d341123893a17e32542ddc17f9
Modified files:
libpurple/protocols/jabber/xfer.c
ChangeLog:
Actually check the caps of the selected resource, not that of the top resource
Oops... :)
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/xfer.c b8410f49ab5492c5a76fe0fb9a2b061dd65653b5
+++ libpurple/protocols/jabber/xfer.c 79f1d75483a326c5ceadb7e8cf0e0f723d30794e
@@ -27,6 +27,8 @@ jabber_xfer_support_jingle_ft(const Purp
{
JabberStream *js = (JabberStream *) gc->proto_data;
JabberBuddy *jb;
+ JabberBuddyResource *jbr;
+ gchar *resource = jabber_get_resource(who);
if (!js) {
purple_debug_error("jabber",
@@ -36,9 +38,15 @@ jabber_xfer_support_jingle_ft(const Purp
jb = jabber_buddy_find(js, who, FALSE);
if (jb) {
- return jabber_buddy_has_capability(jb, JINGLE_APP_FT) &&
- (jabber_buddy_has_capability(jb, JINGLE_TRANSPORT_S5B) ||
- jabber_buddy_has_capability(jb, JINGLE_TRANSPORT_IBB));
+ if (resource) {
+ jbr = jabber_buddy_find_resource(jb, resource);
+ g_free(resource);
+ return jabber_resource_has_capability(jbr, JINGLE_APP_FT) &&
+ (jabber_resource_has_capability(jbr, JINGLE_TRANSPORT_S5B) ||
+ jabber_resource_has_capability(jbr, JINGLE_TRANSPORT_IBB));
+ } else {
+ return FALSE;
+ }
} else {
return FALSE;
}
More information about the Commits
mailing list