nsresult StopBluetoothConnection() { if (!sDBusConnection) { NS_WARNING("DBusConnection does not exist, nothing to stop, skipping."); return NS_OK; } dbus_connection_remove_filter(sDBusConnection->mConnection, EventFilter, NULL); sDBusConnection = NULL; sBluetoothEventObserverTable->Clear(); sBluetoothEventObserverTable = NULL; return NS_OK; }