Re: [PATCH obexd] Fix file size issue in GetProperties

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Luiz,

--------------------------------------------------
From: "Luiz Augusto von Dentz" <luiz.dentz@xxxxxxxxx>
Sent: Friday, December 02, 2011 8:01 PM
To: "Jaganath" <jaganath.k@xxxxxxxxxxx>
Cc: <linux-bluetooth@xxxxxxxxxxxxxxx>
Subject: Re: [PATCH obexd] Fix file size issue in GetProperties

Hi Jaganath,

On Fri, Dec 2, 2011 at 3:00 PM, Jaganath <jaganath.k@xxxxxxxxxxx> wrote:


Nice catch, but I would like to avoid another public function for
this, so how about making obc_transfer_set_file static on transfer.c
calling it in obc_transfer_register?

--
Luiz Augusto von Dentz
--


obc_transfer_register is being called from obc_session_get which
eventually calls obc_transfer_get in which if transfer->name is NULL
transfer->filename is open with write mode. obc_session_get is used from
pbap and sync with name as NULL and filename as NOT NULL.

Now I realize why I didn't do it since the beginning, because the
application can skip the files it is probably better to not open them
until they are acknowledged, also it is very bad idea to call back the
daemon while within the Request as the daemon could be waiting the
application to acknowledged it can cause a deadlock where both the
application and obex-client are waiting for each other.

There are plans to change this API so OPP would also register a
session and all transfers register an object, with this we will
probably not need the agent interface anymore and things became a bit
simpler as we return the transfer object directly on SendFile.

--
Luiz Augusto von Dentz
--
I accept that it is bad to have a dbus round trip. But I am unclear about the deadlock
scenario since deamon is calling "Request" method asynchronously.
Since transfer is already registered before "Request" method, application can call "GetProperties" at any point of time.
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux