[folks] bluez: Ignore missing sessions when removing sessions
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] bluez: Ignore missing sessions when removing sessions
- Date: Sun, 6 Apr 2014 08:59:53 +0000 (UTC)
commit 89ba19db4f6532afaf30944deba6a5f188695e9c
Author: Philip Withnall <philip withnall collabora co uk>
Date: Thu Apr 3 14:42:38 2014 +0100
bluez: Ignore missing sessions when removing sessions
This occasionally happens when running the unit tests. The check only
applies to unit tests, so will have no effect in production use.
https://bugzilla.gnome.org/show_bug.cgi?id=726973
backends/bluez/bluez-persona-store.vala | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/backends/bluez/bluez-persona-store.vala b/backends/bluez/bluez-persona-store.vala
index 7326218..4defe99 100644
--- a/backends/bluez/bluez-persona-store.vala
+++ b/backends/bluez/bluez-persona-store.vala
@@ -539,9 +539,18 @@ public class Folks.Backends.BlueZ.PersonaStore : Folks.PersonaStore
}
catch (IOError ie)
{
- /* Ignore errors from closing or cancelling. */
+ /* Ignore errors from closing or cancelling, or if the session has
+ * disappeared already. */
if (ie is IOError.CLOSED || ie is IOError.CANCELLED)
return;
+ if (ie is IOError.DBUS_ERROR &&
+ ie.message.has_prefix ("GDBus.Error:org.freedesktop.DBus." +
+ "Python.dbus.exceptions.DBusException: " +
+ "('org.freedesktop.DBus.Mock.NameError'"))
+ {
+ /* Only used in unit tests. */
+ return;
+ }
warning ("Couldn’t remove OBEX session ‘%s’: %s",
session_path, ie.message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]