--- a/jingle/check.c Thu Jul 01 22:11:10 2010 +0200
+++ b/jingle/check.c Fri Jul 02 17:04:41 2010 +0200
@@ -27,7 +27,7 @@
#include <jingle/check.h>
#include <jingle/jingle.h>
-
+#include <jingle/register.h>
static JingleContent *check_content(LmMessageNode *node, GError **err);
gint index_in_array(const gchar *str, const gchar **array);
@@ -104,7 +104,8 @@
JingleContent *cn = g_new0(JingleContent, 1);
const gchar *creatorstr, *sendersstr;
gint tmp, tmp2;
-
+ LmMessageNode *tmpnode = NULL;
+
creatorstr = lm_message_node_get_attribute(node, "creator");
cn->disposition = lm_message_node_get_attribute(node, "disposition");
cn->name = lm_message_node_get_attribute(node, "name");
@@ -128,16 +129,30 @@
cn->creator = (JingleCreator)tmp;
cn->senders = (JingleSenders)tmp2;
-
- cn->description = lm_message_node_get_child(node, "description");
- cn->transport = lm_message_node_get_child(node, "transport");
- if (cn->description == NULL || cn->transport == NULL) {
+ tmpnode = lm_message_node_get_child(node, "description");
+ if(tmpnode == NULL) {
g_set_error(err, JINGLE_CHECK_ERROR, JINGLE_CHECK_ERROR_MISSING,
"a child element of content is missing");
g_free(cn);
return NULL;
}
+ cn->xmlns_desc = lm_message_node_get_attribute(tmpnode, "xmlns");
+
+ cn->description = (gconstpointer*)jingle_get_appfuncs(cn->xmlns_desc)->parse(tmpnode);
+
+ tmpnode = lm_message_node_get_child(node, "transport");
+ if (tmpnode == NULL) {
+ g_set_error(err, JINGLE_CHECK_ERROR, JINGLE_CHECK_ERROR_MISSING,
+ "a child element of content is missing");
+ g_free(cn);
+ return NULL;
+ }
+
+ cn->xmlns_trans = lm_message_node_get_attribute(tmpnode, "xmlns");
+
+ cn->transport = (gconstpointer*)jingle_get_transportfuncs(cn->xmlns_trans)->parse(tmpnode);
+
return cn;
}