Mercurial > pidgin
comparison libpurple/plugins/signals-test.c @ 27007:d148ca9e4d9a
Use the modified signal in more places.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Wed, 03 Jun 2009 06:54:35 +0000 |
parents | 8502d69e45ed |
children | 95cc20ede768 f1437342cc0e |
comparison
equal
deleted
inserted
replaced
27006:d31af94a715d | 27007:d148ca9e4d9a |
---|---|
669 "child %p name=%s, namespace=%s\n", | 669 "child %p name=%s, namespace=%s\n", |
670 type, id, from, child, child->name, | 670 type, id, from, child, child->name, |
671 xmlnode_get_namespace(child)); | 671 xmlnode_get_namespace(child)); |
672 | 672 |
673 if (g_str_equal(type, "get") || g_str_equal(type, "set")) { | 673 if (g_str_equal(type, "get") || g_str_equal(type, "set")) { |
674 PurplePlugin *prpl; | |
675 PurplePluginProtocolInfo *prpl_info; | |
676 char *str; | |
677 | |
678 /* Send the requisite reply */ | 674 /* Send the requisite reply */ |
679 xmlnode *iq = xmlnode_new("iq"); | 675 xmlnode *iq = xmlnode_new("iq"); |
680 xmlnode_set_attrib(iq, "to", from); | 676 xmlnode_set_attrib(iq, "to", from); |
681 xmlnode_set_attrib(iq, "id", id); | 677 xmlnode_set_attrib(iq, "id", id); |
682 xmlnode_set_attrib(iq, "type", "result"); | 678 xmlnode_set_attrib(iq, "type", "result"); |
683 | 679 |
684 str = xmlnode_to_str(iq, NULL); | 680 purple_signal_emit(purple_connection_get_prpl(pc), |
685 prpl = purple_connection_get_prpl(pc); | 681 "jabber-sending-xmlnode", pc, &iq); |
686 prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl); | 682 if (iq != NULL) |
687 prpl_info->send_raw(pc, str, -1); | 683 xmlnode_free(iq); |
688 g_free(str); | |
689 xmlnode_free(iq); | |
690 } | 684 } |
691 | 685 |
692 /* Cookie monster eats IQ stanzas; the prpl shouldn't keep processing */ | 686 /* Cookie monster eats IQ stanzas; the prpl shouldn't keep processing */ |
693 return TRUE; | 687 return TRUE; |
694 } | 688 } |