comparison libpurple/protocols/jabber/buddy.c @ 27509:ebd9630ffc77

propagate from branch 'im.pidgin.pidgin' (head cec487e50b3df746ae8b23771513bf85734f618d) to branch 'im.pidgin.cpw.darkrain42.obsolete' (head 1fc27ec0bc11e95aeff8c890ab68a5ddcb4bfb8d)
author Paul Aurich <paul@darkrain42.org>
date Sun, 12 Jul 2009 04:41:56 +0000
parents 95c56191d26c
children a12574d982a1
comparison
equal deleted inserted replaced
27369:01927ce552bc 27509:ebd9630ffc77
159 JabberBuddyResource *jbr = jabber_buddy_find_resource(jb, resource); 159 JabberBuddyResource *jbr = jabber_buddy_find_resource(jb, resource);
160 if(!jbr) { 160 if(!jbr) {
161 jbr = g_new0(JabberBuddyResource, 1); 161 jbr = g_new0(JabberBuddyResource, 1);
162 jbr->jb = jb; 162 jbr->jb = jb;
163 jbr->name = g_strdup(resource); 163 jbr->name = g_strdup(resource);
164 jbr->capabilities = JABBER_CAP_XHTML; 164 jbr->capabilities = JABBER_CAP_NONE;
165 jbr->tz_off = PURPLE_NO_TZ_OFF; 165 jbr->tz_off = PURPLE_NO_TZ_OFF;
166 jb->resources = g_list_append(jb->resources, jbr); 166 jb->resources = g_list_append(jb->resources, jbr);
167 } 167 }
168 jbr->priority = priority; 168 jbr->priority = priority;
169 jbr->state = state; 169 jbr->state = state;
2224 { 2224 {
2225 const GList *node = NULL; 2225 const GList *node = NULL;
2226 const JabberCapsNodeExts *exts; 2226 const JabberCapsNodeExts *exts;
2227 2227
2228 if (!jbr->caps.info) { 2228 if (!jbr->caps.info) {
2229 purple_debug_error("jabber", 2229 purple_debug_info("jabber",
2230 "Unable to find caps: nothing known about buddy\n"); 2230 "Unable to find caps: nothing known about buddy\n");
2231 return FALSE; 2231 return FALSE;
2232 } 2232 }
2233 2233
2234 node = g_list_find_custom(jbr->caps.info->features, cap, (GCompareFunc)strcmp); 2234 node = g_list_find_custom(jbr->caps.info->features, cap, (GCompareFunc)strcmp);
2242 if (features) 2242 if (features)
2243 node = g_list_find_custom(features, cap, (GCompareFunc)strcmp); 2243 node = g_list_find_custom(features, cap, (GCompareFunc)strcmp);
2244 } 2244 }
2245 } 2245 }
2246 2246
2247 /* TODO: Are these messages actually useful? */
2248 if (node)
2249 purple_debug_info("jabber", "Found cap: %s\n", cap);
2250 else
2251 purple_debug_info("jabber", "Cap %s not found\n", cap);
2252
2253 return (node != NULL); 2247 return (node != NULL);
2254 } 2248 }
2255 2249
2256 gboolean 2250 gboolean
2257 jabber_buddy_has_capability(const JabberBuddy *jb, const gchar *cap) 2251 jabber_buddy_has_capability(const JabberBuddy *jb, const gchar *cap)