# HG changeset patch # User Marcus Lundblad # Date 1240425443 0 # Node ID 7be72613e9ce6b78810054916625dbc52e86078b # Parent 4a18d518a572b447a7964a496f53fdb28d986585 Actually reject content unknown content types on Jingle session-initiate, instead of crashing :) I found this while tinkering with Jingle FT, when it sent such an initiate (because of hashed caps, I believe). diff -r 4a18d518a572 -r 7be72613e9ce libpurple/protocols/jabber/jingle/content.c --- a/libpurple/protocols/jabber/jingle/content.c Fri Apr 17 21:31:45 2009 +0000 +++ b/libpurple/protocols/jabber/jingle/content.c Wed Apr 22 18:37:23 2009 +0000 @@ -391,7 +391,13 @@ jingle_content_parse(xmlnode *content) { const gchar *type = xmlnode_get_namespace(xmlnode_get_child(content, "description")); - return JINGLE_CONTENT_CLASS(g_type_class_ref(jingle_get_type(type)))->parse(content); + GType jingle_type = jingle_get_type(type); + + if (jingle_type != G_TYPE_NONE) { + return JINGLE_CONTENT_CLASS(g_type_class_ref(jingle_type))->parse(content); + } else { + return NULL; + } } static xmlnode *