diff options
author | David King <dking@redhat.com> | 2013-09-20 15:28:47 +0100 |
---|---|---|
committer | David King <amigadave@amigadave.com> | 2013-09-20 15:46:25 +0100 |
commit | 2e67887344aa9e347d30d0b2c69fb8c84c23b9da (patch) | |
tree | c88f84f94ba96f1dad48f5160ec9e27493e7ec03 | |
parent | 478678d41b3309ebfd1f1f7cc396369f2ee25e1e (diff) | |
download | nautilus-2e67887344aa9e347d30d0b2c69fb8c84c23b9da.tar.gz |
search-provider: Return TRUE from GDBus method handlers
As Matthias Clasen noticed, the signal handlers for the gdbus-codegen
skeleton for the shell search provider have the wrong signature, and
should return TRUE to indicate that the signal has been handled.
Otherwise, it is down to chance if the method is handled or if a
method-not-implemented error is emitted. It seems that the GCC option
-fstack-protector-strong causes the default return value to be
interpreted as FALSE, so this might explain why the problem was only
noticed by a wide variety of users recently.
The bug manifests as Nautilus not returning any search results when
using the gnome-shell activities overview search.
https://bugzilla.gnome.org/show_bug.cgi?id=692041
-rw-r--r-- | src/nautilus-shell-search-provider.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/nautilus-shell-search-provider.c b/src/nautilus-shell-search-provider.c index 449ab70c9..d12711551 100644 --- a/src/nautilus-shell-search-provider.c +++ b/src/nautilus-shell-search-provider.c @@ -438,7 +438,7 @@ execute_search (NautilusShellSearchProvider *self, g_free (terms_joined); } -static void +static gboolean handle_get_initial_result_set (NautilusShellSearchProvider2 *skeleton, GDBusMethodInvocation *invocation, gchar **terms, @@ -448,9 +448,10 @@ handle_get_initial_result_set (NautilusShellSearchProvider2 *skeleton, g_debug ("****** GetInitialResultSet"); execute_search (self, invocation, terms); + return TRUE; } -static void +static gboolean handle_get_subsearch_result_set (NautilusShellSearchProvider2 *skeleton, GDBusMethodInvocation *invocation, gchar **previous_results, @@ -461,6 +462,7 @@ handle_get_subsearch_result_set (NautilusShellSearchProvider2 *skeleton, g_debug ("****** GetSubSearchResultSet"); execute_search (self, invocation, terms); + return TRUE; } typedef struct { @@ -570,7 +572,7 @@ result_list_attributes_ready_cb (GList *file_list, result_metas_data_free (data); } -static void +static gboolean handle_get_result_metas (NautilusShellSearchProvider2 *skeleton, GDBusMethodInvocation *invocation, gchar **results, @@ -601,7 +603,7 @@ handle_get_result_metas (NautilusShellSearchProvider2 *skeleton, if (missing_files == NULL) { result_metas_return_from_cache (data); result_metas_data_free (data); - return; + return TRUE; } nautilus_file_list_call_when_ready (missing_files, @@ -610,9 +612,10 @@ handle_get_result_metas (NautilusShellSearchProvider2 *skeleton, result_list_attributes_ready_cb, data); nautilus_file_list_free (missing_files); + return TRUE; } -static void +static gboolean handle_activate_result (NautilusShellSearchProvider2 *skeleton, GDBusMethodInvocation *invocation, gchar *result, @@ -632,9 +635,10 @@ handle_activate_result (NautilusShellSearchProvider2 *skeleton, } nautilus_shell_search_provider2_complete_activate_result (skeleton, invocation); + return TRUE; } -static void +static gboolean handle_launch_search (NautilusShellSearchProvider2 *skeleton, GDBusMethodInvocation *invocation, gchar **terms, @@ -652,6 +656,7 @@ handle_launch_search (NautilusShellSearchProvider2 *skeleton, g_free (uri); nautilus_shell_search_provider2_complete_launch_search (skeleton, invocation); + return TRUE; } static void |