[PATCH] core: fix when no slow/writable keys available
- From: Víctor Manuel Jáquez Leal <vjaquez igalia com>
- To: grilo-list gnome org
- Subject: [PATCH] core: fix when no slow/writable keys available
- Date: Thu, 21 Oct 2010 15:46:33 +0200
When the source doesn't have slow/writable keys (empty set) the key list is
not filtered.
This patch set to NULL the filtered key list, and the returned complement is
the passed key list.
Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez igalia com>
---
src/grl-metadata-source.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/grl-metadata-source.c b/src/grl-metadata-source.c
index 8395dbf..cbb56c0 100644
--- a/src/grl-metadata-source.c
+++ b/src/grl-metadata-source.c
@@ -795,8 +795,10 @@ grl_metadata_source_filter_slow (GrlMetadataSource *source,
slow_keys = grl_metadata_source_slow_keys (source);
if (!slow_keys) {
+ GList *_keys = *keys;
+ *keys = NULL;
if (return_filtered) {
- return g_list_copy (*keys);
+ return _keys;
} else {
return NULL;
}
@@ -832,8 +834,10 @@ grl_metadata_source_filter_writable (GrlMetadataSource *source,
writable_keys = grl_metadata_source_writable_keys (source);
if (!writable_keys) {
+ GList *_keys = *keys;
+ *keys = NULL;
if (return_filtered) {
- return g_list_copy (*keys);
+ return _keys;
} else {
return NULL;
}
--
1.7.1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]