Hi Chris,
On 07/06/2015 11:38 AM, BARDEN Christopher (MM) wrote:
Hello,
Using the DBus API, I noticed that the first call to GetProperties() in
the Handsfree interface always fails with an “InProgress” error. I have
verified that this behavior isn’t there in 1.14, but does seem to be in
both 1.15 and 1.16. Any subsequent calls to GetProperties() are
successful and return the properties of that interface successfully. I
couldn’t find a bug tracker to submit this to, so I thought this would
be the most appropriate place. What is your recommendation for working
around this issue?
Looks like someone forgot to mark the GetProperties method as ASYNC
which might cause this.
Try git commit 454b7e63e38b8df034a3c5e1d9b8562ca92ceb0b to see if it
fixes this issue.
The very first call to GetProperties triggers a +CNUM query to the
driver. Once the query is performed, the results are cached and the
reply is returned. All subsequent replies will be generated on the
cached results. If you have multiple clients that are trying to utilize
GetProperties during the initial query time, then all-but-one will
receive an InProgress error.
Here's the commit for reference:
diff --git a/src/handsfree.c b/src/handsfree.c
static const GDBusMethodTable handsfree_methods[] = {
- { GDBUS_METHOD("GetProperties",
+ { GDBUS_ASYNC_METHOD("GetProperties",
NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
handsfree_get_properties) },
{ GDBUS_ASYNC_METHOD("SetProperty",
Regards,
-Denis