bool switch_user_subsession(const int session_uid, const std::string_view prev_subsession, const std::string_view next_subsession)
{
- if (prev_subsession == next_subsession)
+ if (prev_subsession == next_subsession) {
+ LOGD("Switch to '%s' not needed, already current", prev_subsession.data());
return true;
+ }
/* We switch into next first, and only then switch away from prev. This is so
* that we are never in an intermediate "no session" state which is important
return subsessions;
} catch (std::runtime_error &ex) {
+ LOGE("Runtime exception while enumerating user subsessions [session_uid=%d]: %s", session_uid, ex.what());
return {};
} catch (std::exception const &ex) {
LOGE("Exception while enumerating user subsessions [session_uid=%d]: %s", session_uid, ex.what());
throw std::runtime_error(std::string("Unknown method ") + method_name + " called");
LOGD("Handling %s call from %s", method_name, sender);
(self->*(to_call->second))(invocation, std::string_view(sender), parameters);
+ LOGD("Successfully handled %s call from %s", method_name, sender);
} catch (const std::invalid_argument &ex) {
g_dbus_method_invocation_return_dbus_error(invocation,
get_dbus_error_mapping(SUBSESSION_ERROR_INVALID_PARAMETER), ex.what());