<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>Hi Simon,<BR>
<BR>
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.<BR>
<BR>
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.<BR>
<BR>
For Example:<BR>
<BR>
gboolean<BR>
this_is_my_method(......<FONT size=2>DBusGMethodInvocation *context</FONT>)<BR>
<FONT face="" size=2>dbus_g_method_return (</FONT><FONT color=#0000c0 size=2>context</FONT><FONT size=2>);</FONT><BR>
<BR>
...... do some really long running processes.<BR>
<BR>
call_a_function_which_needs_context(context)<BR>
<BR>
.... emit my signals here.<BR>
<BR>
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 (<FONT face="" color=#0000c0 size=2>context</FONT><FONT face="" size=2>); 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.</FONT><BR>
<BR>
I'd really welcome any suggestions.<BR>
<BR>
Robert<BR><br /><hr />A prize an hour, 24 hours a day. <a href='http://www.bigsnapsearch.com
' target='_new'>Try Big Snap now!</a></body>
</html>