Комментарии |
(0000506)
skirsdeda (администратор)
2008-11-25 21:55
|
I am not so sure that this is a good idea. Basically the transfer ends either with ErrorOccurred or TransferCompleted signals. You are proposing to introduce one more case where none of these signals would be emitted upon transfer completion. Unless you can convince me to do this, I would recommend changing your code. |
|
(0000510)
Jo (инициатор)
2008-12-01 03:43
|
Hi,
I add more remarks and logs about the situation in more tail.
If the OBEX server user rejects the incoming client OPP file transfer request, ODS sends series of signals as the dbus-monitor logs below. ODS sends TransferCompleted signal after series of TransferStarted and TransferProgress signals as a normal transfer success case, even though the server has rejected the request. The server application would understand that the TransferCompleted signal does not mean the transfer success cause the application has rejected it. But the TransferCompleted signal itself does not say anything about the result of the client request.
That's why I think ODS should not send TransferCompleted signal in this case rather shoud send ErrorOccurred in this case.
By the way, I verified that the bug: 0000148 has been fixed.
--
signal sender=:1.88 -> dest=(null destination) path=/org/openobex/server1; interface=org.openobex.Server; member=SessionCreated
object path "/org/openobex/serversession0"
signal sender=:1.88 -> dest=(null destination) path=/org/openobex/serversession0; interface=org.openobex.ServerSession; member=TransferStarted
string "test.jpg"
string ""
uint64 88679
signal sender=:1.88 -> dest=(null destination) path=/org/openobex/serversession0; interface=org.openobex.ServerSession; member=TransferProgress
uint64 0
signal sender=:1.88 -> dest=(null destination) path=/org/openobex/serversession0; interface=org.openobex.ServerSession; member=TransferProgress
uint64 0
signal sender=:1.88 -> dest=(null destination) path=/org/openobex/serversession0; interface=org.openobex.ServerSession; member=TransferCompleted
signal sender=:1.88 -> dest=(null destination) path=/org/openobex/serversession0; interface=org.openobex.ServerSession; member=Disconnected
signal sender=:1.88 -> dest=(null destination) path=/org/openobex/server1; interface=org.openobex.Server; member=SessionRemoved
object path "/org/openobex/serversession0"
-- |
|
(0000511)
skirsdeda (администратор)
2008-12-01 03:54
|
Which ods version or svn revision are you using here? |
|
(0000513)
Jo (инициатор)
2008-12-01 06:19
|
I'm using ODS release 0.4.2 with openobex 1.4. |
|
(0000514)
skirsdeda (администратор)
2008-12-01 11:35
|
I did some work on this after 0.4.2, so get newest ods from svn. |
|
(0000517)
Jo (инициатор)
2008-12-02 07:23
|
I tested with the newest ODS version in SVN.
There has been lots of changes during this short period of time :)
Seeing the logs below from dbus-monitor tool, Cancelled singnal is emitted before the TransferCompleted singal followed by Disconnected signal. I think ErrorOccurred signal or no signal is better in this initial cancelling case because actual transfer has rejused by the server. But if this stream of signal flow breaks current ODS signaling mechanism I would change my application code using previous information.
--
signal sender=:1.145 -> dest=(null destination) path=/org/openobex/server1; interface=org.openobex.Server; member=SessionCreated
object path "/org/openobex/serversession3"
signal sender=:1.145 -> dest=(null destination) path=/org/openobex/serversession3; interface=org.openobex.ServerSession; member=TransferStarted
string "apple.bmp"
string "/tmp/apple.bmp"
uint64 116216
signal sender=:1.145 -> dest=(null destination) path=/org/openobex/serversession3; interface=org.openobex.ServerSession; member=Cancelled
signal sender=:1.145 -> dest=(null destination) path=/org/openobex/serversession3; interface=org.openobex.ServerSession; member=TransferCompleted
signal sender=:1.145 -> dest=(null destination) path=/org/openobex/serversession3; interface=org.openobex.ServerSession; member=Disconnected
signal sender=:1.145 -> dest=(null destination) path=/org/openobex/server1; interface=org.openobex.Server; member=SessionRemoved
object path "/org/openobex/serversession3"
-- |
|