Methods need always return values?
robert_rawlins at hotmail.com
Tue Apr 15 07:45:40 PDT 2008
Your solution seems to be exactly what I was looking for :-) However, I wonder if you can answer this question on the same subject for me.
At the moment I'm returning from the method immediately and then performing some long running tasks, then emitting some signals when they are complete. By returning a value immediately it means the DBUS method call doesn't timeout whilst the processes in the method take some time to run. The problem which occurs is due to the fact that I need to use 'context' later on in the method, this means it crashes my application with a segfault, presumably because 'context' has already been returned.
...... do some really long running processes.
.... emit my signals here.
Does that make sense? how can I avoid this issue? The only way I can see at the moment is to move dbus_g_method_return (context); to the bottom of the method, however, this will cause my client application to receive DBUS timeout errors when calling this method as the processes within it are so slow.
I'd really welcome any suggestions.
Get Hotmail on your mobile. Text MSN to 63463 now!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dbus