doc: Label Profile1.Release() method as no reply
PATCH 1/3 doc: Label Profile1.Release() method as no reply
The current implementation does not expect a reply, nor would it make sense for BlueZ to wait for one from the agent. So explicitly label this method as noreply.
--- doc/profile-api.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
doc/profile-api.txt +1 -1
@@ -108,7 +108,7 @@ Service unique name Interface org.bluez.Profile1 Object path freely definable -Methods void Release() +Methods void Release() [noreply] This method gets called when the service daemon unregisters the profile. A profile can use it to do
Signature · 1 line
1.8.1.5
PATCH 2/3 doc: Remove Profile1.Cancel() method
There does not seem to be any actual need for this method.
The current implementation calls Cancel when a pending NewConnection() or RequestDisconnection() method call fails. Additionally it calls Cancel() when the remote client has disconnected. In either case BlueZ calls shutdown on the file descriptor associated with the agent and issues a Cancel() method call.
The closing of the file descriptor will trigger a HUP on the agent side, which will trigger normal cleanup procedures. The received Cancel() method call is redundant in both cases.
--- doc/profile-api.txt | 8 -------- 1 file changed, 8 deletions(-)
doc/profile-api.txt +0 -8
@@ -145,11 +145,3 @@ Methods void Release() [noreply] Possible errors: org.bluez.Error.Rejected org.bluez.Error.Canceled - - void Cancel() - - This method gets called to indicate that the profile - request failed before a reply was returned. - - All request are queued and there will be only one - pending pequest at a time per profile.
Signature · 1 line
1.8.1.5
PATCH 3/3 profile: Remove support for Cancel method
In reply to Denis Kenzior--- src/profile.c | 18 ------------------ 1 file changed, 18 deletions(-)
src/profile.c +0 -18
@@ -678,20 +678,9 @@ static struct ext_profile *find_ext_profile(const char *owner,return NULL ; } -static void ext_cancel (struct ext_profile *ext) -{ -DBusMessage *msg; - - msg =dbus_message_new_method_call (ext->owner, ext->path, -"org.bluez.Profile1" ,"Cancel" ); -if (msg) -g_dbus_send_message (btd_get_dbus_connection (), msg); -} -static void ext_io_destroy (gpointer p) {struct ext_io *ext_io = p; -struct ext_profile *ext = ext_io->ext;if (ext_io->io_id >0 )g_source_remove (ext_io->io_id);
@@ -711,7 +700,6 @@ static void ext_io_destroy(gpointer p)if (ext_io->pending) {dbus_pending_call_cancel (ext_io->pending);dbus_pending_call_unref (ext_io->pending); -ext_cancel (ext); }if (ext_io->resolving)
@@ -783,9 +771,6 @@ static void new_conn_reply(DBusPendingCall *call, void *user_data)btd_service_connecting_complete (conn->service, -ECONNREFUSED ); -if (dbus_error_has_name (&err,DBUS_ERROR_NO_REPLY )) -ext_cancel (ext); -dbus_error_free (&err); ext->conns =g_slist_remove (ext->conns, conn);
@@ -817,9 +802,6 @@ static void disconn_reply(DBusPendingCall *call, void *user_data)btd_service_disconnecting_complete (conn->service, -ECONNREFUSED ); -if (dbus_error_has_name (&err,DBUS_ERROR_NO_REPLY )) -ext_cancel (ext); -dbus_error_free (&err); disconnect:
Signature · 1 line
1.8.1.5
Hi Denis,
Quoted 6 lines · Denis Kenzior
The current implementation does not expect a reply, nor would it make sense for BlueZ to wait for one from the agent. So explicitly label this method as noreply.
--- doc/profile-api.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
All three patches have been applied. Thanks.
Johan