From 8021eba1e4d72cda0adb0f8124655eee444b2fb8 Mon Sep 17 00:00:00 2001 From: Denis Date: Tue, 26 Dec 2023 15:00:57 +0100 Subject: [PATCH] wtf... --- rog_ally.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/rog_ally.c b/rog_ally.c index 9768750..bd4a27e 100644 --- a/rog_ally.c +++ b/rog_ally.c @@ -1205,21 +1205,7 @@ static int rc71l_platform_leds(const dev_in_settings_t *const conf, uint8_t r, u } // Append the property name and the new value to the message - dbus_message_append_args(message, DBUS_TYPE_STRING, &target_interface_name, DBUS_TYPE_STRING, &property_name, DBUS_TYPE_INVALID); - - // Initialize an iterator for the message arguments - DBusMessageIter iter; - dbus_message_iter_init_append(message, &iter); - - // Open the variant container - DBusMessageIter variantIter; - dbus_message_iter_open_container(&iter, DBUS_TYPE_VARIANT, "u", &variantIter); - - // Append the uint32 value to the variant container - dbus_message_iter_append_basic(&variantIter, DBUS_TYPE_UINT32, &new_brightness); - - // Close the variant container - dbus_message_iter_close_container(&iter, &variantIter); + dbus_message_append_args(message, DBUS_TYPE_STRING, &target_interface_name, DBUS_TYPE_STRING, &property_name, DBUS_TYPE_VARIANT, "v", DBUS_TYPE_UINT32, &new_brightness, DBUS_TYPE_INVALID); // Send the message DBusMessage *reply = dbus_connection_send_with_reply_and_block(platform->dbus_conn, message, -1, &platform->dbus_error); @@ -1235,7 +1221,7 @@ static int rc71l_platform_leds(const dev_in_settings_t *const conf, uint8_t r, u // Handle the reply if needed // Free the D-Bus message - dbus_message_unref(message); + //dbus_message_unref(message); return 0; }