summaryrefslogtreecommitdiff
path: root/libdleyna
diff options
context:
space:
mode:
authorRegis Merlino <regis.merlino@intel.com>2013-07-17 11:00:49 +0200
committerLudovic Ferrandis <ludovic.ferrandis@intel.com>2013-07-17 13:55:58 +0200
commitc9b0223c59ebb46ef08c47bd2a93f2e9a649f343 (patch)
tree9a5a3d58e96d13889496477e293f73dba4497070 /libdleyna
parentcb346e5c0edfa86e0714a6b69c276e033b8c6c50 (diff)
downloaddleyna-renderer-c9b0223c59ebb46ef08c47bd2a93f2e9a649f343.tar.gz
[Device] GetAll: do not fail if the DMR returns an error for GetPositionInfo
Fix issue 92: <https://github.com/01org/dleyna-renderer/issues/92> Signed-off-by: Regis Merlino <regis.merlino@intel.com>
Diffstat (limited to 'libdleyna')
-rw-r--r--libdleyna/renderer/device.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/libdleyna/renderer/device.c b/libdleyna/renderer/device.c
index ff463db..174e090 100644
--- a/libdleyna/renderer/device.c
+++ b/libdleyna/renderer/device.c
@@ -1609,12 +1609,21 @@ static void prv_get_position_info_cb(GUPnPServiceProxy *proxy,
&error, "RelTime",
G_TYPE_STRING, &rel_pos, NULL);
if (!end || (rel_pos == NULL)) {
- message = (error != NULL) ? error->message : "Invalid result";
- cb_data->error = g_error_new(DLEYNA_SERVER_ERROR,
- DLEYNA_ERROR_OPERATION_FAILED,
- "GetPositionInfo operation failed: %s",
- message);
- goto on_error;
+ if (cb_data->task.type == DLR_TASK_GET_ALL_PROPS) {
+ /* Do not fail, just remove the property */
+ g_hash_table_remove(cb_data->device->props.player_props,
+ DLR_INTERFACE_PROP_POSITION);
+ goto end;
+ } else {
+ message = (error != NULL) ? error->message :
+ "Invalid result";
+ cb_data->error = g_error_new(
+ DLEYNA_SERVER_ERROR,
+ DLEYNA_ERROR_OPERATION_FAILED,
+ "GetPositionInfo operation failed: %s",
+ message);
+ goto end;
+ }
}
changed_props_vb = g_variant_builder_new(G_VARIANT_TYPE("a{sv}"));
@@ -1631,7 +1640,7 @@ static void prv_get_position_info_cb(GUPnPServiceProxy *proxy,
g_variant_unref(changed_props);
g_variant_builder_unref(changed_props_vb);
-on_error:
+end:
if (error != NULL)
g_error_free(error);