pidgin/pidgin

b8e9a7b626d4
Parents d45730609bcc
Children 11275a766260
Fix some namespace changes that I made accidentally. Also add a G_UNLIKELY
macro call where Eion points out it could be useful.
--- a/libpurple/protocols/bonjour/bonjour_ft.c Thu Oct 24 22:46:46 2019 -0400
+++ b/libpurple/protocols/bonjour/bonjour_ft.c Sat Oct 26 00:52:20 2019 -0400
@@ -235,7 +235,7 @@
purple_xmlnode_set_namespace(feature, "http://jabber.org/protocol/feature-neg");
x = purple_xmlnode_new_child(feature, "x");
- purple_xmlnode_set_namespace(x, "xmpp:x:data");
+ purple_xmlnode_set_namespace(x, "jabber:x:data");
purple_xmlnode_set_attrib(x, "type", "form");
field = purple_xmlnode_new_child(x, "field");
@@ -283,7 +283,7 @@
purple_xmlnode_set_namespace(feature, "http://jabber.org/protocol/feature-neg");
x = purple_xmlnode_new_child(feature, "x");
- purple_xmlnode_set_namespace(x, "xmpp:x:data");
+ purple_xmlnode_set_namespace(x, "jabber:x:data");
purple_xmlnode_set_attrib(x, "type", "submit");
field = purple_xmlnode_new_child(x, "field");
--- a/libpurple/protocols/bonjour/parser.c Thu Oct 24 22:46:46 2019 -0400
+++ b/libpurple/protocols/bonjour/parser.c Sat Oct 26 00:52:20 2019 -0400
@@ -155,7 +155,7 @@
{
BonjourXMPPConversation *bconv = user_data;
- purple_debug_error("xmpp", "XML parser error for BonjourXMPPConversation %p: "
+ purple_debug_error("bonjour", "XML parser error for BonjourXMPPConversation %p: "
"Domain %i, code %i, level %i: %s",
bconv,
error->domain, error->code, error->level,
--- a/libpurple/protocols/bonjour/xmpp.c Thu Oct 24 22:46:46 2019 -0400
+++ b/libpurple/protocols/bonjour/xmpp.c Sat Oct 26 00:52:20 2019 -0400
@@ -62,7 +62,7 @@
#define STREAM_END "</stream:stream>"
/* TODO: specify version='1.0' and send stream features */
#define DOCTYPE "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" \
- "<stream:stream xmlns=\"xmpp:client\" xmlns:stream=\"http://etherx.jabber.org/streams\" from=\"%s\" to=\"%s\">"
+ "<stream:stream xmlns=\"jabber:client\" xmlns:stream=\"http://etherx.jabber.org/streams\" from=\"%s\" to=\"%s\">"
enum sent_stream_start_types {
NOT_SENT = 0,
@@ -147,7 +147,7 @@
return;
}
- events_node = purple_xmlnode_get_child_with_namespace(message_node, "x", "xmpp:x:event");
+ events_node = purple_xmlnode_get_child_with_namespace(message_node, "x", "jabber:x:event");
if (events_node != NULL) {
if (purple_xmlnode_get_child(events_node, "id") != NULL) {
/* The user is just typing */
@@ -514,7 +514,7 @@
}
/* This is EXTREMELY unlikely to happen */
- if (ret < len) {
+ if (G_UNLIKELY(ret < len)) {
char *tmp = g_strdup(ss->msg + ret);
g_free(ss->msg);
ss->msg = tmp;
@@ -1090,7 +1090,7 @@
purple_xmlnode_insert_child(node, node2);
node = purple_xmlnode_new_child(message_node, "x");
- purple_xmlnode_set_namespace(node, "xmpp:x:event");
+ purple_xmlnode_set_namespace(node, "jabber:x:event");
purple_xmlnode_insert_child(node, purple_xmlnode_new("composing"));
message = purple_xmlnode_to_str(message_node, NULL);