Fix incorrectly terminated MakeThreadHighPriority dbus message
authorSam Lantinga
Mon, 30 Mar 2020 14:26:10 -0700
changeset 136806ef67a58efb4
parent 13679 304c6020419a
child 13681 e078c7e21285
Fix incorrectly terminated MakeThreadHighPriority dbus message

Currently the message is double terminated, which results in SDL_DBus_CallMethodInternal()
incorrectly assuming that the other party is always returning true.

I'm not super familiar with dbus, so I'm not sure if this could also be the cause of this bug:
https://github.com/ValveSoftware/steam-for-linux/issues/6901
src/core/linux/SDL_threadprio.c
     1.1 --- a/src/core/linux/SDL_threadprio.c	Sat Mar 28 15:43:55 2020 -0400
     1.2 +++ b/src/core/linux/SDL_threadprio.c	Mon Mar 30 14:26:10 2020 -0700
     1.3 @@ -68,8 +68,7 @@
     1.4  
     1.5      if (!dbus || !SDL_DBus_CallMethodOnConnection(dbus->system_conn,
     1.6              RTKIT_DBUS_NODE, RTKIT_DBUS_PATH, RTKIT_DBUS_INTERFACE, "MakeThreadHighPriority",
     1.7 -            DBUS_TYPE_UINT64, &ui64, DBUS_TYPE_INT32, &si32, DBUS_TYPE_INVALID,
     1.8 -            DBUS_TYPE_INVALID)) {
     1.9 +            DBUS_TYPE_UINT64, &ui64, DBUS_TYPE_INT32, &si32, DBUS_TYPE_INVALID)) {
    1.10          return SDL_FALSE;
    1.11      }
    1.12      return SDL_TRUE;