From f4aabd8b7cb2ac249ed0dcbd0062b29914b5bbe7 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Sat, 16 Apr 2016 17:16:29 -0700 Subject: [PATCH] perf: ignore not-supported failures If the pre-authorize fails due to lacking support for sysprofd, that is fine, we can fail later on if authorization was required. --- lib/sp-perf-source.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/sp-perf-source.c b/lib/sp-perf-source.c index 5c4a67e4..15617150 100644 --- a/lib/sp-perf-source.c +++ b/lib/sp-perf-source.c @@ -460,8 +460,11 @@ sp_perf_source_authorize_cb (GObject *object, if (!sp_perf_counter_authorize_finish (result, &error)) { - sp_source_emit_failed (SP_SOURCE (self), error); - return; + if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED)) + { + sp_source_emit_failed (SP_SOURCE (self), error); + return; + } } self->is_ready = TRUE;