On Fri, 2014-08-01 at 21:37 +0200, Lukasz Wojciechowski wrote: > We still need to figure out best way to wait for results. We need some > research from Jacek. > I think hints that You've left in bus/check.c will help us.
Let me add a few things. The current concept relies on the privilege cache. It does not attempt to somehow attach the pending privilege check to the specific message that needs the result. Instead the assumption is that the next time the message gets checked, a result can be taken directly from the cache. This is obvious from the way the code was written, but I don't think I spelled it out explicitly. The entire check_privilege() method is (intentionally) undocumented because it isn't clear whether it'll stay like it is. > When a request to cynara is passed and bus_check_privilege will return > BUS_RESULT_LATER, we need to add our socket connected with cynara to > dbus, so it will be monitored and our callback will be launched when > some data appear on that socket. The check_privilege() implementation can get access to the main loop. See bus_connection_get_loop() and the test code in dispatch.c. The test code merely uses that to register a timeout. The real code should add a file descriptor watch with a suitable handler. -- Best Regards, Patrick Ohly The content of this message is my personal opinion only and although I am an employee of Intel, the statements I make here in no way represent Intel's position on the issue, nor am I authorized to speak on behalf of Intel on this matter. _______________________________________________ Dev mailing list Dev@lists.tizen.org https://lists.tizen.org/listinfo/dev