New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove blocking dbus calls #209
Remove blocking dbus calls #209
Conversation
If something like this is needed later on, it must be re-implemented without using dbus_send_with_block().
This is needed if the pending call needs to be cancelled.
The semi procedural logic is replaced by stacked state machines that should ensure that mce is never blocked if sensord gets stuck for some reason. Externally the interface provided by mce-sensorfw does not change. [mce] Rewrite mce-sensorfw module so that it does not use blocking dbus calls. Fixes JB#17747
Remove duplicate entry.
The sysinfod service is provided by proprietary Nokia component and the compatibility has already been disabled for almost two years. Since get_sysinfo_value() was the last place within mce itself to use blocking dbus method calls, dropping support altogether allows removal of blocking dbus call helpers too.
Future MCE code should never use blocking dbus ipc and thus the helper for making them is removed.
Can be turned in to a png file with dot from graphviz package: dot -Tpng mce-sensorfw.dot -o mce-sensorfw.png
Legacy way of dealing with asynchronous dbus method calls in mce was to a) leave one extra ref to pending call when issuing the method call b) call dbus_pending_call_unref() from handler callback Which is problematic since (b) does not happen if the pending call is canceled. Now the extra reference is cleared after it is no longer needed and calls to dbus_pending_call_unref() from all related handler callbacks are removed.
These were accidentally left in after testing.
Leftovers from testing and evolving logic.
Used to just clear the pointer, which created a memory leak.
Makes valgrind output less noisy.
Makes valgrind output less noisy.
Makes valgrind output less noisy.
Makes valgrind output less noisy.
The dbus_send_with_block() helper must not be used anymore. Handle query asynchronously.
| @@ -43,6 +43,6 @@ void mce_sensorfw_orient_disable(void); | |||
|
|
|||
| # ifdef __cplusplus | |||
| }; | |||
| #endif | |||
| # endif | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why space here and on the ifdef __cpluplus above after # that is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Syntactical rules is that the # must be at column 0, but it's nice to indicate nesting. Since there's already an outer preprocessor block, my guess is that the space indicates that it's nested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is there just to make nesting levels easier to see.
In this case the c++ bracked had confused auto-indent in my editor way back in time and the # indentation was not done for the whole header.
No description provided.