[gupnp-av/wip/didl-lite-fragments: 13/19] Error fixes.
- From: Krzesimir Nowak <krnowak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gupnp-av/wip/didl-lite-fragments: 13/19] Error fixes.
- Date: Tue, 23 Oct 2012 14:35:27 +0000 (UTC)
commit 297b2215b0d3dce07299a2be70131376b50c4913
Author: Krzesimir Nowak <krnowak openismus com>
Date: Mon Oct 22 15:08:19 2012 +0200
Error fixes.
libgupnp-av/gupnp-didl-lite-object.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/libgupnp-av/gupnp-didl-lite-object.c b/libgupnp-av/gupnp-didl-lite-object.c
index 12ee94a..e040812 100644
--- a/libgupnp-av/gupnp-didl-lite-object.c
+++ b/libgupnp-av/gupnp-didl-lite-object.c
@@ -3046,9 +3046,9 @@ gupnp_didl_lite_object_apply_fragments (GUPnPDIDLLiteObject *object,
g_return_val_if_fail (GUPNP_IS_DIDL_LITE_OBJECT (object),
GUPNP_DIDL_LITE_FRAGMENT_RESULT_UNKNOWN_ERROR);
g_return_val_if_fail (current_fragments != NULL,
- GUPNP_DIDL_LITE_FRAGMENT_RESULT_UNKNOWN_ERROR);
+ GUPNP_DIDL_LITE_FRAGMENT_RESULT_CURRENT_INVALID);
g_return_val_if_fail (new_fragments != NULL,
- GUPNP_DIDL_LITE_FRAGMENT_RESULT_UNKNOWN_ERROR);
+ GUPNP_DIDL_LITE_FRAGMENT_RESULT_NEW_INVALID);
vdata = get_xsd_validate_data ();
@@ -3068,6 +3068,11 @@ gupnp_didl_lite_object_apply_fragments (GUPnPDIDLLiteObject *object,
goto out;
}
+ if (!current_size) {
+ result = GUPNP_DIDL_LITE_FRAGMENT_RESULT_CURRENT_INVALID;
+ goto out;
+ }
+
original.doc = object->priv->xml_doc->doc;
original.node = object->priv->xml_node;
modified.doc = xmlCopyDoc (original.doc, 1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]