Skip to contentSkip to conversation

l_dbus_message_set_arguments

DISCUSSION Gix 3 participants 3 messages May 15, 2019

lore
Share & tools
lore

Gix

#0 lore raw

When creating a response to a D-Bus message with

reply = l_dbus_message_new_method_return(msg);

where the original method has an empty (void) return list, is it neccessary to set the arguments:

l_dbus_message_set_arguments(reply, "");

or can I just:

return l_dbus_message_new_method_return(msg);

from within the message handler? (without setting non-existant arguments)

#1 lore raw

Hi Brian,

Quoted 7 lines · Brian

When creating a response to a D-Bus message with

reply = l_dbus_message_new_method_return(msg);

where the original method has an empty (void) return list, is it neccessary to set the arguments:

Quoted 7 lines

l_dbus_message_set_arguments(reply, "");

or can I just:

return l_dbus_message_new_method_return(msg);

from within the message handler? (without setting non-existant arguments)

either will work. The latter is what I prefer to see/use.

See:
https://git.kernel.org/pub/scm/libs/ell/ell.git/tree/ell/dbus.c#n321

Regards,
-Denis

#2 lore raw
In reply to Gix

Hi Brian,

Quoted 7 lines · Brian

When creating a response to a D-Bus message with

reply = l_dbus_message_new_method_return(msg);

where the original method has an empty (void) return list, is it neccessary to set the arguments:

Quoted 8 lines

l_dbus_message_set_arguments(reply, "");

or can I just:

return l_dbus_message_new_method_return(msg);

from within the message handler? (without setting non-existant arguments)

I don't think you have to set the arguments if there isn't any. We do it both ways in IWD, but it doesn't seem to be required.

Thanks,
James

Quoted 4 lines

_______________________________________________
ell mailing list
ell(a)lists.01.org
https://lists.01.org/mailman/listinfo/ell