dbus: change EAGAIN to EBUSY for "already listening"

Seems like a more precise description.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
pull/191/head
Peter Hutterer 2019-08-22 11:10:45 +10:00 committed by Benjamin Tissoires
parent ebf48be0ad
commit 14da500310
2 changed files with 9 additions and 9 deletions

View File

@ -79,7 +79,7 @@ org.freedesktop.tuhi1.Manager
successful termination of the search process, either when a device
has been registered or the timeout expired.
If the errno is -EAGAIN, the daemon is already searching for devices
If the errno is -EBUSY, the daemon is already searching for devices
on behalf of another client. In this case, this client should wait for
the Searching property to change and StartSearching() once the
property is set to False.
@ -261,7 +261,7 @@ org.freedesktop.tuhi1.Device
StopListening(). Otherwise, the argument is a negative errno
indicating the type of error.
If the errno is -EAGAIN, the daemon is already listening to the device
If the errno is -EBUSY, the daemon is already listening to the device
on behalf of another client. In this case, this client should wait for
the Listening property to change and StartListening() once the
property is set to False.
@ -288,7 +288,7 @@ org.freedesktop.tuhi1.Device
StopLive(). Otherwise, the argument is a negative errno
indicating the type of error.
If the errno is -EAGAIN, the daemon has already enabled live mode on
If the errno is -EBUSY, the daemon has already enabled live mode on
device on behalf of another client. In this case, this client should
wait for the Live property to change and StartLive() once the property
is set to False.

View File

@ -354,10 +354,10 @@ class TuhiDBusDevice(_TuhiDBus):
if self.listening:
logger.debug(f'{self} - already listening')
# silently ignore it for the current client but send EAGAIN to
# silently ignore it for the current client but send EBUSY to
# other clients
if sender != self._listening_client[0]:
status = GLib.Variant.new_int32(-errno.EAGAIN)
status = GLib.Variant.new_int32(-errno.EBUSY)
self.signal('ListeningStopped', status, dest=sender)
return
@ -404,10 +404,10 @@ class TuhiDBusDevice(_TuhiDBus):
if self.live:
logger.debug(f'{self} - already in live mode')
# silently ignore it for the current client but send EAGAIN to
# silently ignore it for the current client but send EBUSY to
# other clients
if sender != self._listening_client[0]:
status = GLib.Variant.new_int32(-errno.EAGAIN)
status = GLib.Variant.new_int32(-errno.EBUSY)
self.signal('LiveStopped', status, dest=sender)
return
@ -577,10 +577,10 @@ class TuhiDBusServer(_TuhiDBus):
if self.is_searching:
logger.debug('Already searching')
# silently ignore it for the current client but send EAGAIN to
# silently ignore it for the current client but send EBUSY to
# other clients
if sender != self._searching_client[0]:
status = GLib.Variant.new_int32(-errno.EAGAIN)
status = GLib.Variant.new_int32(-errno.EBUSY)
self.signal('SearchStopped', status)
return