Mercurial > pidgin
comparison libpurple/protocols/jabber/disco.c @ 25952:5f9a24d1c25e
Remove some extra trailing whitespace I noticed after merging mlundblad's
xmpp branches.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Mon, 02 Mar 2009 06:37:05 +0000 |
parents | 7d6280b006a8 |
children | ae2b4394fbe2 7e020fbe2cdb 439f07ce4c8a c4fd9222dda1 ff4212a5268f f5e613e05332 |
comparison
equal
deleted
inserted
replaced
25951:13574de83636 | 25952:5f9a24d1c25e |
---|---|
138 SUPPORT_FEATURE("http://jabber.org/protocol/si") | 138 SUPPORT_FEATURE("http://jabber.org/protocol/si") |
139 SUPPORT_FEATURE("http://jabber.org/protocol/si/profile/file-transfer") | 139 SUPPORT_FEATURE("http://jabber.org/protocol/si/profile/file-transfer") |
140 SUPPORT_FEATURE("http://jabber.org/protocol/xhtml-im") | 140 SUPPORT_FEATURE("http://jabber.org/protocol/xhtml-im") |
141 SUPPORT_FEATURE("urn:xmpp:ping") | 141 SUPPORT_FEATURE("urn:xmpp:ping") |
142 SUPPORT_FEATURE("http://www.xmpp.org/extensions/xep-0199.html#ns") | 142 SUPPORT_FEATURE("http://www.xmpp.org/extensions/xep-0199.html#ns") |
143 | 143 |
144 if(!node) { /* non-caps disco#info, add all enabled extensions */ | 144 if(!node) { /* non-caps disco#info, add all enabled extensions */ |
145 GList *features; | 145 GList *features; |
146 for(features = jabber_features; features; features = features->next) { | 146 for(features = jabber_features; features; features = features->next) { |
147 JabberFeature *feat = (JabberFeature*)features->data; | 147 JabberFeature *feat = (JabberFeature*)features->data; |
148 if(feat->is_enabled == NULL || feat->is_enabled(js, feat->shortname, feat->namespace) == TRUE) | 148 if(feat->is_enabled == NULL || feat->is_enabled(js, feat->shortname, feat->namespace) == TRUE) |
164 else | 164 else |
165 break; | 165 break; |
166 } else if(node[pos] != CAPS0115_NODE[pos]) | 166 } else if(node[pos] != CAPS0115_NODE[pos]) |
167 break; | 167 break; |
168 } | 168 } |
169 | 169 |
170 if(ext != NULL) { | 170 if(ext != NULL) { |
171 /* look for that ext */ | 171 /* look for that ext */ |
172 GList *features; | 172 GList *features; |
173 for(features = jabber_features; features; features = features->next) { | 173 for(features = jabber_features; features; features = features->next) { |
174 JabberFeature *feat = (JabberFeature*)features->data; | 174 JabberFeature *feat = (JabberFeature*)features->data; |
179 } | 179 } |
180 if(features == NULL) | 180 if(features == NULL) |
181 ext = NULL; | 181 ext = NULL; |
182 } | 182 } |
183 } | 183 } |
184 | 184 |
185 if(ext == NULL) { | 185 if(ext == NULL) { |
186 xmlnode *error, *inf; | 186 xmlnode *error, *inf; |
187 | 187 |
188 /* XXX: gross hack, implement jabber_iq_set_type or something */ | 188 /* XXX: gross hack, implement jabber_iq_set_type or something */ |
189 xmlnode_set_attrib(iq->node, "type", "error"); | 189 xmlnode_set_attrib(iq->node, "type", "error"); |
190 iq->type = JABBER_IQ_ERROR; | 190 iq->type = JABBER_IQ_ERROR; |
191 | 191 |
192 error = xmlnode_new_child(query, "error"); | 192 error = xmlnode_new_child(query, "error"); |
193 xmlnode_set_attrib(error, "code", "404"); | 193 xmlnode_set_attrib(error, "code", "404"); |
194 xmlnode_set_attrib(error, "type", "cancel"); | 194 xmlnode_set_attrib(error, "type", "cancel"); |
195 inf = xmlnode_new_child(error, "item-not-found"); | 195 inf = xmlnode_new_child(error, "item-not-found"); |
196 xmlnode_set_namespace(inf, "urn:ietf:params:xml:ns:xmpp-stanzas"); | 196 xmlnode_set_namespace(inf, "urn:ietf:params:xml:ns:xmpp-stanzas"); |
316 const char *type = xmlnode_get_attrib(packet, "type"); | 316 const char *type = xmlnode_get_attrib(packet, "type"); |
317 | 317 |
318 if(type && !strcmp(type, "get")) { | 318 if(type && !strcmp(type, "get")) { |
319 JabberIq *iq = jabber_iq_new_query(js, JABBER_IQ_RESULT, | 319 JabberIq *iq = jabber_iq_new_query(js, JABBER_IQ_RESULT, |
320 "http://jabber.org/protocol/disco#items"); | 320 "http://jabber.org/protocol/disco#items"); |
321 | 321 |
322 /* preserve node */ | 322 /* preserve node */ |
323 xmlnode *iq_query = xmlnode_get_child_with_namespace(iq->node,"query","http://jabber.org/protocol/disco#items"); | 323 xmlnode *iq_query = xmlnode_get_child_with_namespace(iq->node,"query","http://jabber.org/protocol/disco#items"); |
324 if(iq_query) { | 324 if(iq_query) { |
325 xmlnode *query = xmlnode_get_child_with_namespace(packet,"query","http://jabber.org/protocol/disco#items"); | 325 xmlnode *query = xmlnode_get_child_with_namespace(packet,"query","http://jabber.org/protocol/disco#items"); |
326 if(query) { | 326 if(query) { |