http://bugzilla.moblin.org/show_bug.cgi?id=6376
--- Comment #13 from yongsheng zhu <yongsheng.zhu(a)intel.com> 2009-12-17 01:08:18
PST ---
(In reply to comment #12)
(In reply to comment #11)
> 2) There is a timeout function to check whether to abort or suspend the sync
> though checking the global flags(internally set by signal handler). However,
> dbus server might receive 'abort' events from server and sets them in
> DBusSync.checkForAbort/checkForSuspend callbacks. SyncContext will regually
> call it. So for this, ObexTransportAgent has to wait for at least one response
> from OBEXD. This is not so reasonable. ObexTransportAgent timeout function
> should invoke checkForAbort/checkForSuspend instead of arbitrarily reading
> internal global flags.
I think the problem is: abort from dbus clients do not (and should not?) set
the global flags (SuspendFlags, AbortFlags), however all transport
implementation only checks this flags instead of calling the virtual method
(checkForAbort/checkForSuspend). Therefore abort from dbus clients will not be
visible to transports (Not Obex specific).
To cope with this, we need to pass the SyncContext instance to Transport and
calling checkForAbort/checkForSuspend instead of checking the flags directly.
For
other transport agents other than ObexTransportAgent, they don't use the
'while' loop in wait(), thus they return once an event handler calls
g_main_loop_quit. As a result, SyncContext::doSync can call its
checkForAbort/checkForSuspend to avoid this problem. But anyway, these timeout
funcs all have the issue Congwu said.
--
Configure bugmail:
http://bugzilla.moblin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching someone on the CC list of the bug.