diff options
author | Mark Ryan <mark.d.ryan@intel.com> | 2012-12-06 21:14:23 +0100 |
---|---|---|
committer | Jens Georg <mail@jensge.org> | 2012-12-09 20:41:32 +0100 |
commit | aed51b9ead8ce35da7504a483590d4cc3b996301 (patch) | |
tree | 25771cea5de40f76675a75f1784d2f85c05a3872 | |
parent | 953272f9dfb024089b4db2c78b5ee910e51df7bc (diff) | |
download | gupnp-av-aed51b9ead8ce35da7504a483590d4cc3b996301.tar.gz |
Fix CDS LastChange parser updateID handling
The CDS LastChange parser is currently always returning 0 for the
updateID of a last change event. This is because it is trying to
extract the value from a child node rather than an attribute. This
commit fixes the problem by treating the updateID as an attribute.
https://bugzilla.gnome.org/show_bug.cgi?id=689808
-rw-r--r-- | libgupnp-av/gupnp-cds-last-change-parser.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libgupnp-av/gupnp-cds-last-change-parser.c b/libgupnp-av/gupnp-cds-last-change-parser.c index 1f120de..d51d385 100644 --- a/libgupnp-av/gupnp-cds-last-change-parser.c +++ b/libgupnp-av/gupnp-cds-last-change-parser.c @@ -154,7 +154,7 @@ gupnp_cds_last_change_parser_parse (GUPnPCDSLastChangeParser *parser, tmp = xml_util_get_attribute_content (it, "objClass"); entry->class = g_strdup (tmp); - entry->update_id = xml_util_get_uint_child_element + entry->update_id = (guint32) xml_util_get_uint_attribute (it, "updateID", 0); @@ -173,7 +173,7 @@ gupnp_cds_last_change_parser_parse (GUPnPCDSLastChangeParser *parser, tmp = xml_util_get_attribute_content (it, "objID"); entry->object_id = g_strdup (tmp); - entry->update_id = xml_util_get_uint_child_element + entry->update_id = (guint32) xml_util_get_uint_attribute (it, "updateID", 0); @@ -192,7 +192,7 @@ gupnp_cds_last_change_parser_parse (GUPnPCDSLastChangeParser *parser, tmp = xml_util_get_attribute_content (it, "objID"); entry->object_id = g_strdup (tmp); - entry->update_id = xml_util_get_uint_child_element + entry->update_id = (guint32) xml_util_get_uint_attribute (it, "updateID", 0); @@ -211,7 +211,7 @@ gupnp_cds_last_change_parser_parse (GUPnPCDSLastChangeParser *parser, tmp = xml_util_get_attribute_content (it, "objID"); entry->object_id = g_strdup (tmp); - entry->update_id = xml_util_get_uint_child_element + entry->update_id = (guint32) xml_util_get_uint_attribute (it, "updateID", 0); |