summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand SIMONNET <bsimonnet@google.com>2016-01-06 17:45:01 -0800
committerBertrand SIMONNET <bsimonnet@google.com>2016-01-06 17:45:01 -0800
commitda04820d4f6c808cc997a3957be0aad62c4f3fd2 (patch)
treee50954c2d659d1cdc63d3e7c2105a16db3862e76
parentb22b2857a43c8acff39efc0749f21f9ff349fb32 (diff)
downloadlibchrome-brillo-m9-release.tar.gz
ChromeOS: Don't abort when the dbus connection drops.brillo-m9-releasebrillo-m9-dev
We don't abort when the dbus bus disconnects on Android, we should do the same on Chrome OS. Bug: 26267381 Change-Id: I7b4060e91c89916fdaca33a617cdcae6c98e21e3
-rw-r--r--dbus/bus.cc37
1 files changed, 0 insertions, 37 deletions
diff --git a/dbus/bus.cc b/dbus/bus.cc
index 91188467a5..a9e14edef0 100644
--- a/dbus/bus.cc
+++ b/dbus/bus.cc
@@ -23,13 +23,6 @@ namespace dbus {
namespace {
-#if !defined(__ANDROID__)
-const char kDisconnectedSignal[] = "Disconnected";
-const char kDisconnectedMatchRule[] =
- "type='signal', path='/org/freedesktop/DBus/Local',"
- "interface='org.freedesktop.DBus.Local', member='Disconnected'";
-#endif
-
// The NameOwnerChanged member in org.freedesktop.DBus
const char kNameOwnerChangedSignal[] = "NameOwnerChanged";
@@ -447,15 +440,6 @@ bool Bus::Connect() {
}
}
-#if !defined(__ANDROID__)
- // We shouldn't exit on the disconnected signal.
- dbus_connection_set_exit_on_disconnect(connection_, false);
-
- // Watch Disconnected signal.
- AddFilterFunction(Bus::OnConnectionDisconnectedFilter, this);
- AddMatch(kDisconnectedMatchRule, error.get());
-#endif
-
return true;
}
@@ -515,11 +499,6 @@ void Bus::ShutdownAndBlock() {
// Remove Disconnected watcher.
ScopedDBusError error;
-#if !defined(__ANDROID__)
- RemoveFilterFunction(Bus::OnConnectionDisconnectedFilter, this);
- RemoveMatch(kDisconnectedMatchRule, error.get());
-#endif
-
if (connection_type_ == PRIVATE)
ClosePrivateConnection();
// dbus_connection_close() won't unref.
@@ -1195,22 +1174,6 @@ void Bus::OnDispatchStatusChangedThunk(DBusConnection* connection,
self->OnDispatchStatusChanged(connection, status);
}
-#if !defined(__ANDROID__)
-// static
-DBusHandlerResult Bus::OnConnectionDisconnectedFilter(
- DBusConnection* connection,
- DBusMessage* message,
- void* data) {
- if (dbus_message_is_signal(message,
- DBUS_INTERFACE_LOCAL,
- kDisconnectedSignal)) {
- // Abort when the connection is lost.
- LOG(FATAL) << "D-Bus connection was disconnected. Aborting.";
- }
- return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
-}
-#endif
-
// static
DBusHandlerResult Bus::OnServiceOwnerChangedFilter(
DBusConnection* /* connection */,