Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e0a1951 authored by Nick Pelly's avatar Nick Pelly
Browse files

Tell DBUS not to call _exit() if the DBUS connection disconnects.

This was causing the system server to quietly die. Naughty DBUS!!

Now you will just see errors in the log "DBUS connection disconnected"
on every DBUS call.

There is still the root cause problem of why the DBUS connection disconnects,
which is not addressed by this change.
parent e6881c63
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ static void initializeNativeDataNative(JNIEnv* env, jobject object) {
            LOGE("Could not get onto the system bus!");
            dbus_error_free(&err);
        }
        dbus_connection_set_exit_on_disconnect(conn, FALSE);
    }
#endif
}
+1 −0
Original line number Diff line number Diff line
@@ -84,6 +84,7 @@ static bool initNative(JNIEnv* env, jobject object) {
        dbus_error_free(&err);
        return false;
    }
    dbus_connection_set_exit_on_disconnect(nat->conn, FALSE);
#endif  /*HAVE_BLUETOOTH*/
    return true;
}
+1 −0
Original line number Diff line number Diff line
@@ -109,6 +109,7 @@ static bool initializeNativeDataNative(JNIEnv* env, jobject object) {
        dbus_error_free(&err);
        return false;
    }
    dbus_connection_set_exit_on_disconnect(nat->conn, FALSE);

    nat->adapter = BLUEZ_ADAPTER_OBJECT_NAME;
#endif  /*HAVE_BLUETOOTH*/
+1 −0
Original line number Diff line number Diff line
@@ -132,6 +132,7 @@ static void initializeNativeDataNative(JNIEnv* env, jobject object) {
            LOGE("%s: Could not get onto the system bus!", __FUNCTION__);
            dbus_error_free(&err);
        }
        dbus_connection_set_exit_on_disconnect(nat->conn, FALSE);
    }
#endif
}