| 280 |
280 |
| 281 from = xmlnode_get_attrib(packet, "from"); |
281 from = xmlnode_get_attrib(packet, "from"); |
| 282 id = xmlnode_get_attrib(packet, "id"); |
282 id = xmlnode_get_attrib(packet, "id"); |
| 283 iq_type = xmlnode_get_attrib(packet, "type"); |
283 iq_type = xmlnode_get_attrib(packet, "type"); |
| 284 |
284 |
| 285 signal_return = GPOINTER_TO_INT(purple_signal_emit_return_1(jabber_plugin, |
|
| 286 "jabber-receiving-iq", js->gc, iq_type, id, from, packet)); |
|
| 287 if (signal_return) |
|
| 288 return; |
|
| 289 |
|
| 290 /* |
285 /* |
| 291 * child will be either the first tag child or NULL if there is no child. |
286 * child will be either the first tag child or NULL if there is no child. |
| 292 * Historically, we used just the 'query' subchild, but newer XEPs use |
287 * Historically, we used just the 'query' subchild, but newer XEPs use |
| 293 * differently named children. Grabbing the first child is (for the time |
288 * differently named children. Grabbing the first child is (for the time |
| 294 * being) sufficient. |
289 * being) sufficient. |
| 342 purple_debug_error("jabber", "IQ of type '%s' missing id - ignoring.\n", |
337 purple_debug_error("jabber", "IQ of type '%s' missing id - ignoring.\n", |
| 343 iq_type); |
338 iq_type); |
| 344 |
339 |
| 345 return; |
340 return; |
| 346 } |
341 } |
| |
342 |
| |
343 signal_return = GPOINTER_TO_INT(purple_signal_emit_return_1(jabber_plugin, |
| |
344 "jabber-receiving-iq", js->gc, iq_type, id, from, packet)); |
| |
345 if (signal_return) |
| |
346 return; |
| 347 |
347 |
| 348 /* First, lets see if a special callback got registered */ |
348 /* First, lets see if a special callback got registered */ |
| 349 if(type == JABBER_IQ_RESULT || type == JABBER_IQ_ERROR) { |
349 if(type == JABBER_IQ_RESULT || type == JABBER_IQ_ERROR) { |
| 350 if((jcd = g_hash_table_lookup(js->iq_callbacks, id))) { |
350 if((jcd = g_hash_table_lookup(js->iq_callbacks, id))) { |
| 351 jcd->callback(js, from, type, id, packet, jcd->data); |
351 jcd->callback(js, from, type, id, packet, jcd->data); |