Example #1
0
static void
pk_backend_spawn_stdout_cb (PkBackendSpawn *spawn, const gchar *line, PkBackendSpawn *backend_spawn)
{
	gboolean ret;
	g_autoptr(GError) error = NULL;
	ret = pk_backend_spawn_inject_data (backend_spawn,
					    backend_spawn->priv->job,
					    line,
					    &error);
	if (!ret)
		g_warning ("failed to parse: %s: %s", line, error->message);
}
Example #2
0
/**
 * pk_backend_spawn_stdout_cb:
 **/
static void
pk_backend_spawn_stdout_cb (PkBackendSpawn *spawn, const gchar *line, PkBackendSpawn *backend_spawn)
{
	gboolean ret;
	GError *error = NULL;
	ret = pk_backend_spawn_inject_data (backend_spawn, line, &error);
	if (!ret) {
		pk_backend_message (backend_spawn->priv->backend,
				    PK_MESSAGE_ENUM_BACKEND_ERROR,
				    "Failed to parse output: %s", error->message);
		g_warning ("failed to parse: %s: %s", line, error->message);
		g_error_free (error);
	}
}