Replies: 1 comment
-
I think I found a workaround. There is a newer and simpler Dbus package called Protocol::Dbus - there I can make sure the right method is used. With that this becomes a non-issue and can stay backwards compatible. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem Statement:
The Perl integration I'm using for Dbus (Net::DBus) seems to have an issue in identifying the right method based on arguments.
We have two "sendMessage" variants. One (string,array,array) and one (string,array,string). I was using the (string,array,array) version, but suddenly on a different machine (not sure what is causing the difference) it picks the other one resulting into a nonsense string conversion of the array, which is quite harmful if its the recipient number.
I tried the other way round and it looks like "luck" which version Perl is using. It can't make an argument type depending differentiation. While I'm still checking other options, could we consider to rename one of the methods?
That will of course screw up backwards compatibility for people. One reason why the pull request I have in preparation will introduce a "version" method, so people can create backwards compatible code based on that number.
As said, I'm still looking for other options and I know that the two sendmessage methods are fully compliant (dbus-send works with both array and string). But to avoid this issue, I would prefer to rename sendMessage(string,array,string) to sendMessageSingle() or something like this (Ideas welcome)
Beta Was this translation helpful? Give feedback.
All reactions