linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Commit 375d02473fb prevents obexd from accepting profile connections
@ 2016-10-25 16:04 Don Zickus
  2016-10-25 16:08 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 3+ messages in thread
From: Don Zickus @ 2016-10-25 16:04 UTC (permalink / raw)
  To: luiz.von.dentz; +Cc: linux-bluetooth

Hi Luiz,

I was testing 5.42 with my OBEX testsuite and noticed it stopped working due
to the following commit:

commit 375d02473fb7f8b90e39bc79001ab6f97a81bd3b
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date:   Mon Aug 8 13:33:35 2016 +0300

    core/service: Fix setting connecting state

    If the profile don't implement .accept callback it means it cannot
    connect in this mode, which is normally used for GATT profiles, so the
    code shall not assume the service will start connecting and instead just
    return an error.

diff --git a/src/service.c b/src/service.c
index 0da14ab..f387fc4 100644
--- a/src/service.c
+++ b/src/service.c
@@ -197,7 +197,7 @@ int service_accept(struct btd_service *service)
        }

        if (!service->profile->accept)
-               goto done;
+               return -ENOSYS;

        err = service->profile->accept(service);
        if (!err)


It seems all the OBEX profiles lack an .accept function and therefore get
rejected now?

Unless my test environment is misconfigured.  Basically, I have two machines
next to each other, one runs a python script to register an authorization
agent and obex agent and then sits there waiting for remote connections.
The other machine tries to walk through the various obex apis to connect
with the server and exchange data.

Any setup of an obex connection with the server is terminated and my tests
fail.  Thoughts?

Cheers,
Don


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: Commit 375d02473fb prevents obexd from accepting profile connections
  2016-10-25 16:04 Commit 375d02473fb prevents obexd from accepting profile connections Don Zickus
@ 2016-10-25 16:08 ` Luiz Augusto von Dentz
  2016-10-25 16:26   ` Don Zickus
  0 siblings, 1 reply; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2016-10-25 16:08 UTC (permalink / raw)
  To: Don Zickus; +Cc: Luiz Augusto Von Dentz, linux-bluetooth@vger.kernel.org

Hi Don,

On Tue, Oct 25, 2016 at 7:04 PM, Don Zickus <dzickus@redhat.com> wrote:
> Hi Luiz,
>
> I was testing 5.42 with my OBEX testsuite and noticed it stopped working due
> to the following commit:
>
> commit 375d02473fb7f8b90e39bc79001ab6f97a81bd3b
> Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> Date:   Mon Aug 8 13:33:35 2016 +0300
>
>     core/service: Fix setting connecting state
>
>     If the profile don't implement .accept callback it means it cannot
>     connect in this mode, which is normally used for GATT profiles, so the
>     code shall not assume the service will start connecting and instead just
>     return an error.
>
> diff --git a/src/service.c b/src/service.c
> index 0da14ab..f387fc4 100644
> --- a/src/service.c
> +++ b/src/service.c
> @@ -197,7 +197,7 @@ int service_accept(struct btd_service *service)
>         }
>
>         if (!service->profile->accept)
> -               goto done;
> +               return -ENOSYS;
>
>         err = service->profile->accept(service);
>         if (!err)
>
>
> It seems all the OBEX profiles lack an .accept function and therefore get
> rejected now?
>
> Unless my test environment is misconfigured.  Basically, I have two machines
> next to each other, one runs a python script to register an authorization
> agent and obex agent and then sits there waiting for remote connections.
> The other machine tries to walk through the various obex apis to connect
> with the server and exchange data.
>
> Any setup of an obex connection with the server is terminated and my tests
> fail.  Thoughts?

This has been resolved in:

commit ccd29841c3799c68ed90eb050661ffeccea78c9b
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date:   Mon Oct 24 19:32:57 2016 +0300

    core/profile: Fix calling service_accept

    service_accept shall only be used with profiles that implement .accept
    callback, to set connecting state directly use service_set_connecting
    which does not require .accept to be implemented.

-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Commit 375d02473fb prevents obexd from accepting profile connections
  2016-10-25 16:08 ` Luiz Augusto von Dentz
@ 2016-10-25 16:26   ` Don Zickus
  0 siblings, 0 replies; 3+ messages in thread
From: Don Zickus @ 2016-10-25 16:26 UTC (permalink / raw)
  To: Luiz Augusto von Dentz
  Cc: Luiz Augusto Von Dentz, linux-bluetooth@vger.kernel.org

On Tue, Oct 25, 2016 at 07:08:00PM +0300, Luiz Augusto von Dentz wrote:
> This has been resolved in:
> 
> commit ccd29841c3799c68ed90eb050661ffeccea78c9b
> Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> Date:   Mon Oct 24 19:32:57 2016 +0300
> 
>     core/profile: Fix calling service_accept
> 
>     service_accept shall only be used with profiles that implement .accept
>     callback, to set connecting state directly use service_set_connecting
>     which does not require .accept to be implemented.

Hi Luiz,

Great, thanks!  Yes that worked for me!

Cheers,
Don

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-25 16:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-25 16:04 Commit 375d02473fb prevents obexd from accepting profile connections Don Zickus
2016-10-25 16:08 ` Luiz Augusto von Dentz
2016-10-25 16:26   ` Don Zickus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).