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.
This commit is contained in:
Christian Hergert
2016-04-16 17:16:29 -07:00
parent f5904bc493
commit f4aabd8b7c

View File

@ -459,10 +459,13 @@ sp_perf_source_authorize_cb (GObject *object,
g_assert (G_IS_ASYNC_RESULT (result)); g_assert (G_IS_ASYNC_RESULT (result));
if (!sp_perf_counter_authorize_finish (result, &error)) if (!sp_perf_counter_authorize_finish (result, &error))
{
if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED))
{ {
sp_source_emit_failed (SP_SOURCE (self), error); sp_source_emit_failed (SP_SOURCE (self), error);
return; return;
} }
}
self->is_ready = TRUE; self->is_ready = TRUE;