dbus: change EAGAIN to EBUSY for "already listening"
Seems like a more precise description. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
ebf48be0ad
commit
14da500310
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue