pidgin: 14ade547: disapproval of revision '3ac008cdb1707c8...
markdoliner at pidgin.im
markdoliner at pidgin.im
Mon Nov 22 05:51:23 EST 2010
----------------------------------------------------------------------
Revision: 14ade5475598efa6d9394c801112d2c79e36c314
Parent: 3ac008cdb1707c831737d497562a2751cdff861c
Author: markdoliner at pidgin.im
Date: 11/22/10 05:49:06
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/14ade5475598efa6d9394c801112d2c79e36c314
Changelog:
disapproval of revision '3ac008cdb1707c831737d497562a2751cdff861c'
Changes against parent 3ac008cdb1707c831737d497562a2751cdff861c
patched libpurple/protocols/oscar/oscar.c
patched libpurple/xmlnode.c
-------------- next part --------------
============================================================
--- libpurple/protocols/oscar/oscar.c 82395d2f22f147eb06810bb105108d79273f48ab
+++ libpurple/protocols/oscar/oscar.c 3815ff8cf1c62f3eaee5077a094ec10ceae80461
@@ -283,6 +283,7 @@ oscar_chat_kill(PurpleConnection *gc, st
/* Destroy the chat_connection */
od->oscar_chats = g_slist_remove(od->oscar_chats, cc);
+ flap_connection_schedule_destroy(cc->conn, OSCAR_DISCONNECT_DONE, NULL);
oscar_chat_destroy(cc);
}
@@ -4450,7 +4451,6 @@ oscar_chat_leave(PurpleConnection *gc, i
purple_conversation_get_name(conv));
cc = find_oscar_chat(gc, purple_conv_chat_get_id(PURPLE_CONV_CHAT(conv)));
- flap_connection_schedule_destroy(cc->conn, OSCAR_DISCONNECT_DONE, NULL);
oscar_chat_kill(gc, cc);
}
============================================================
--- libpurple/xmlnode.c afa7e0f126cf4787f5034049e26392a4c3a196e2
+++ libpurple/xmlnode.c 713ab433bfe9bdd2a3425d50d2e3321abdfd50c8
@@ -46,30 +46,6 @@
# define NEWLINE_S "\n"
#endif
-#ifdef CHECKING_XML_STRINGS_FOR_VALID_CHARACTERS
-/*
- * The purpose of this function is to prevent us from creating XML documents
- * that contain characters that are not allowed in XML 1.0. However, this
- * change is unfortunately REALLY slow.
- */
-static gboolean is_valid_xml10(const char *str)
-{
- gunichar ch;
-
- for (ch = g_utf8_get_char(str); str[0] != '\0'; str = g_utf8_next_char(str))
- {
- /*
- * Valid characters in XML 1.0 are: #x9 #xA #xD
- * [#x20-#xD7FF] [#xE000-#xFFFD] [#x10000-#x10FFFF]
- */
- if (ch < 0x09 || (ch > 0x0a && ch < 0x0d) || (ch > 0x0d && ch < 0x20))
- return FALSE;
- }
-
- return TRUE;
-}
-#endif /* CHECKING_XML_STRINGS_FOR_VALID_CHARACTERS */
-
static xmlnode*
new_node(const char *name, XMLNodeType type)
{
@@ -133,10 +109,6 @@ xmlnode_insert_data(xmlnode *node, const
g_return_if_fail(data != NULL);
g_return_if_fail(size != 0);
-#ifdef CHECKING_XML_STRINGS_FOR_VALID_CHARACTERS
- g_return_if_fail(is_valid_xml10(data));
-#endif /* CHECKING_XML_STRINGS_FOR_VALID_CHARACTERS */
-
real_size = size == -1 ? strlen(data) : size;
child = new_node(NULL, XMLNODE_TYPE_DATA);
@@ -214,11 +186,6 @@ xmlnode_set_attrib(xmlnode *node, const
void
xmlnode_set_attrib(xmlnode *node, const char *attr, const char *value)
{
-#ifdef CHECKING_XML_STRINGS_FOR_VALID_CHARACTERS
- g_return_if_fail(is_valid_xml10(attr));
- g_return_if_fail(is_valid_xml10(value));
-#endif /* CHECKING_XML_STRINGS_FOR_VALID_CHARACTERS */
-
xmlnode_remove_attrib(node, attr);
xmlnode_set_attrib_full(node, attr, NULL, NULL, value);
}
@@ -243,14 +210,6 @@ xmlnode_set_attrib_full(xmlnode *node, c
g_return_if_fail(node != NULL);
g_return_if_fail(attr != NULL);
g_return_if_fail(value != NULL);
-#ifdef CHECKING_XML_STRINGS_FOR_VALID_CHARACTERS
- g_return_if_fail(is_valid_xml10(attr));
- if (xmlns != NULL)
- g_return_if_fail(is_valid_xml10(xmlns));
- if (prefix != NULL)
- g_return_if_fail(is_valid_xml10(prefix));
- g_return_if_fail(is_valid_xml10(value));
-#endif /* CHECKING_XML_STRINGS_FOR_VALID_CHARACTERS */
xmlnode_remove_attrib_with_namespace(node, attr, xmlns);
attrib_node = new_node(attr, XMLNODE_TYPE_ATTRIB);
More information about the Commits
mailing list