Re: [PATCH BlueZ 1/2] tools/obexctl: Retrieve updated Size property once

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

 



Hi Eramoto,

On Fri, Jan 26, 2018 at 6:14 AM, ERAMOTO Masaya
<eramoto.masaya@xxxxxxxxxxxxxx> wrote:
> Since obexd may have updated the Size property, obexctl retrieves it
> once so that it can output more proper transfer information.
> ---
>  tools/obexctl.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/tools/obexctl.c b/tools/obexctl.c
> index 05bbd3e84..777221d2f 100644
> --- a/tools/obexctl.c
> +++ b/tools/obexctl.c
> @@ -1888,6 +1888,13 @@ static void transfer_property_changed(GDBusProxy *proxy, const char *name,
>         str = proxy_description(proxy, "Transfer", COLORED_CHG);
>
>         if (strcmp(name, "Transferred") == 0) {
> +               /*
> +                * Since the Size property may have been updated at the start
> +                * of the transfer, it is retrieved so that the transfer
> +                * information can be output more proper.
> +                */
> +               if (data->transferred == 0)
> +                       g_dbus_proxy_refresh_property(proxy, "Size");

Usually we don't have to refresh property manually like this, so I
wonder if there is something else going on, perhaps the daemon is not
emitting PropertiesChanged when it should.

>                 print_transferred(data, str, iter);
>                 goto done;
>         }
> --
> 2.14.1
>
> --
> 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



-- 
Luiz Augusto von Dentz
--
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