Mercurial > pidgin.yaz
comparison libpurple/protocols/jabber/disco.c @ 17438:48aebb50a93d
whitespace
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Mon, 28 May 2007 20:54:51 +0000 |
parents | 32c366eeeb99 |
children | d42de194a364 |
comparison
equal
deleted
inserted
replaced
17424:0f65c1856f55 | 17438:48aebb50a93d |
---|---|
222 | 222 |
223 if (!(js->server_caps & JABBER_CAP_GOOGLE_ROSTER)) { | 223 if (!(js->server_caps & JABBER_CAP_GOOGLE_ROSTER)) { |
224 /* If the server supports JABBER_CAP_GOOGLE_ROSTER; we will have already requested it */ | 224 /* If the server supports JABBER_CAP_GOOGLE_ROSTER; we will have already requested it */ |
225 jabber_roster_request(js); | 225 jabber_roster_request(js); |
226 } | 226 } |
227 | 227 |
228 /* Send initial presence; this will trigger receipt of presence for contacts on the roster */ | 228 /* Send initial presence; this will trigger receipt of presence for contacts on the roster */ |
229 gpresence = purple_account_get_presence(js->gc->account); | 229 gpresence = purple_account_get_presence(js->gc->account); |
230 status = purple_presence_get_active_status(gpresence); | 230 status = purple_presence_get_active_status(gpresence); |
231 jabber_presence_send(js->gc->account, status); | 231 jabber_presence_send(js->gc->account, status); |
232 } | 232 } |
233 | 233 |
234 static void | 234 static void |
235 jabber_disco_server_info_result_cb(JabberStream *js, xmlnode *packet, gpointer data) | 235 jabber_disco_server_info_result_cb(JabberStream *js, xmlnode *packet, gpointer data) |
236 { | 236 { |
237 xmlnode *query, *child; | 237 xmlnode *query, *child; |
238 const char *from = xmlnode_get_attrib(packet, "from"); | 238 const char *from = xmlnode_get_attrib(packet, "from"); |
239 const char *type = xmlnode_get_attrib(packet, "type"); | 239 const char *type = xmlnode_get_attrib(packet, "type"); |
240 | 240 |
241 if((!from || !type) || | 241 if((!from || !type) || |
242 (strcmp(from, js->user->domain))) { | 242 (strcmp(from, js->user->domain))) { |
255 if (!query) { | 255 if (!query) { |
256 jabber_disco_finish_server_info_result_cb(js); | 256 jabber_disco_finish_server_info_result_cb(js); |
257 return; | 257 return; |
258 } | 258 } |
259 | 259 |
260 for (child = xmlnode_get_child(query, "identity"); child; | 260 for (child = xmlnode_get_child(query, "identity"); child; |
261 child = xmlnode_get_next_twin(child)) { | 261 child = xmlnode_get_next_twin(child)) { |
262 const char *category, *type, *name; | 262 const char *category, *type, *name; |
263 category = xmlnode_get_attrib(child, "category"); | 263 category = xmlnode_get_attrib(child, "category"); |
264 if (!category || strcmp(category, "server")) | 264 if (!category || strcmp(category, "server")) |
265 continue; | 265 continue; |
266 type = xmlnode_get_attrib(child, "type"); | 266 type = xmlnode_get_attrib(child, "type"); |
267 if (!type || strcmp(type, "im")) | 267 if (!type || strcmp(type, "im")) |
268 continue; | 268 continue; |
269 | 269 |
270 name = xmlnode_get_attrib(child, "name"); | 270 name = xmlnode_get_attrib(child, "name"); |
271 if (!name) | 271 if (!name) |
272 continue; | 272 continue; |
273 | 273 |
274 g_free(js->server_name); | 274 g_free(js->server_name); |
277 purple_debug_info("jabber", "Google Talk!"); | 277 purple_debug_info("jabber", "Google Talk!"); |
278 js->googletalk = TRUE; | 278 js->googletalk = TRUE; |
279 } | 279 } |
280 } | 280 } |
281 | 281 |
282 for (child = xmlnode_get_child(query, "feature"); child; | 282 for (child = xmlnode_get_child(query, "feature"); child; |
283 child = xmlnode_get_next_twin(child)) { | 283 child = xmlnode_get_next_twin(child)) { |
284 const char *var; | 284 const char *var; |
285 var = xmlnode_get_attrib(child, "var"); | 285 var = xmlnode_get_attrib(child, "var"); |
286 if (!var) | 286 if (!var) |
287 continue; | 287 continue; |