ekiga r7247 - trunk/lib/engine/components/resource-list
- From: jpuydt svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r7247 - trunk/lib/engine/components/resource-list
- Date: Thu, 16 Oct 2008 19:56:25 +0000 (UTC)
Author: jpuydt
Date: Thu Oct 16 19:56:25 2008
New Revision: 7247
URL: http://svn.gnome.org/viewvc/ekiga?rev=7247&view=rev
Log:
Fixed XML parsing in RL::Heap
Modified:
trunk/lib/engine/components/resource-list/rl-heap.cpp
Modified: trunk/lib/engine/components/resource-list/rl-heap.cpp
==============================================================================
--- trunk/lib/engine/components/resource-list/rl-heap.cpp (original)
+++ trunk/lib/engine/components/resource-list/rl-heap.cpp Thu Oct 16 19:56:25 2008
@@ -268,8 +268,11 @@
xmlNodePtr doc_root = xmlDocGetRootElement (doc);
- if (doc_root == NULL) {
+ if (doc_root == NULL
+ || doc_root->name == NULL
+ || !xmlStrEqual (BAD_CAST "resource-lists", doc_root->name)) {
+ std::cout << "Invalid document in " << __PRETTY_FUNCTION__ << std::endl;
// FIXME: warn the user somehow?
xmlFreeDoc (doc);
doc = NULL;
@@ -307,7 +310,9 @@
path->set_credentials (username_str, password_str);
path = path->build_child ("resource-lists");
- for (xmlNodePtr child = root->children; child != NULL; child = child->next)
+ for (xmlNodePtr child = doc_root->children;
+ child != NULL;
+ child = child->next)
if (child->type == XML_ELEMENT_NODE
&& child->name != NULL
&& xmlStrEqual (BAD_CAST ("list"), child->name)) {
@@ -318,6 +323,7 @@
list->entry_removed.connect (sigc::mem_fun (this, &RL::Heap::on_entry_removed));
lists.push_back (list);
pos++;
+ list->publish ();
continue;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]