1. 11 Aug, 2019 1 commit
  2. 06 Aug, 2019 1 commit
  3. 02 Aug, 2019 2 commits
  4. 01 Aug, 2019 1 commit
  5. 31 Jul, 2019 2 commits
  6. 28 Jul, 2019 1 commit
  7. 25 Jul, 2019 1 commit
  8. 24 Jul, 2019 4 commits
    • Yuri Benditovich's avatar
      usb-redir: use g_thread_try_new instead of g_thread_new · c8a166a5
      Yuri Benditovich authored
      Newer API (glib 2.32) is safe, in case of error it does not
      abort the process and returns error information.
      Signed-off-by: Yuri Benditovich's avatarYuri Benditovich <yuri.benditovich@daynix.com>
      Acked-by: 's avatarVictor Toso <victortoso@redhat.com>
    • Yuri Benditovich's avatar
      usb-redir: move USB events handling to USB backend · 89a9d391
      Yuri Benditovich authored
      Before this commit:
      usb-device-manager starts thread for handling libusb events:
      on Linux - from the beginning (as it is needed for hotplug
      callbacks), on Windows - starts it on first redirection and
      stops when there are no redirections (it can't keep the thread
      when there are no redirections as with libusb < 1.0.21 it will
      not be able to force the thread to exit if there are no events).
      Current commit moves the event thread and handling events
      completely to usb backend; usb-device-manager and other
      are not aware of libusb and should not assume what it needs
      to work. We start the event thread from the beginning on both
      Linux and Windows. On Linux it works only for hotplug callbacks,
      on Windows - just waits until device redirection starts.
      On dispose of usb-device-manager (when hotplug callbacks are
      deregistered), we interrupt the thread once to stop it.
      This removes many lines of code and also removes all the
      differences between Linux and Windows in usb-device-manager.
      Signed-off-by: Yuri Benditovich's avatarYuri Benditovich <yuri.benditovich@daynix.com>
      Acked-by: 's avatarVictor Toso <victortoso@redhat.com>
    • Yuri Benditovich's avatar
      usb-redir: pass GError to hotplug registration procedure · 6ef53033
      Yuri Benditovich authored
      In case of possible error the procedure of hotplug
      registration does not return error information, just
      issues warning to the stderr, so the reason of the problem,
      if any, is not visible. Current commit adds GError parameter
      to the procedure to return the error details conventionally.
      Signed-off-by: Yuri Benditovich's avatarYuri Benditovich <yuri.benditovich@daynix.com>
      Acked-by: 's avatarVictor Toso <victortoso@redhat.com>
    • Yuri Benditovich's avatar
      usb-redir: unify device hotplug/unplug for Windows and Linux · 9ae25e11
      Yuri Benditovich authored
      Remove Windows-specific part of hotplug detection from
      usb-device-manager and win-usb-dev and place it into
      USB backend module. Connect the hotplug/unplug detection
      in Windows to the same callbacks already used in Linux.
      This removes significant part of Windows-specific code
      and simpifies things.
      Note regarding 'redirecting' property of usb-device-manager:
      - Previously usb-device-manager under Windows maintained
        'redirection' property in win-usb-dev
      - Now it maintains its own property in both Windows and
        Linux (for GUI and single redirect at a time)
      - The USB backend maintains its own 'redirecting' field
        in Windows to prevent update of device list when
        libusb opens the device (device redirection causes
        temporary removal of target device)
      Signed-off-by: Yuri Benditovich's avatarYuri Benditovich <yuri.benditovich@daynix.com>
      Acked-by: 's avatarVictor Toso <victortoso@redhat.com>
  9. 23 Jul, 2019 5 commits
  10. 22 Jul, 2019 1 commit
  11. 18 Jul, 2019 1 commit
  12. 11 Jul, 2019 12 commits
  13. 09 Jul, 2019 2 commits
  14. 08 Jul, 2019 3 commits
  15. 03 Jul, 2019 2 commits
    • Jakub Janků's avatar
      webdav: don't buffer input from phodav · 9f5aee05
      Jakub Janků authored
      The current approach with OutputQueue in webdav has several problems:
      * if the connection is slow, webdav keeps reading from phodav
      and pushing messages to the internal channel xmit_queue.
      This way, the queue can grow very quickly and the whole file
      that is being transferred using webdav essentially gets loaded into memory.
      * spice channel first flushes all messages in the xmit_queue and
      then proceeds to reading. If webdav floods the xmit_queue with
      a ton of messages, spice channel does not leave iterate_write until
      the queue gets empty. This way, reading from the channel is blocked
      till the whole file is transferred.
      * OutputQueue uses g_output_stream_flush_async() on SpiceVmcOutputStream
      that does not implement flush
      To solve these issues, don't read from phodav until the last message
      for a given client is written out to the socket.
      (main channel currently uses the same approach when transferring files)
      OutputQueue used an idle function to schedule the write and then
      called mux_pushed_cb which started reading from phodav with priority
      Since this new approach does not utilize the idle scheduling,
      lower the priority in client_start_read() to G_PRIORITY_DEFAULT_IDLE
      to make sure other sources with lower priority get dispatched as well
      (e.g. signals from coroutines, redrawing and resizing operations).
      Also implement spice_webdav_channel_reset(). This is necessary because
      spice_vmc_write_async() references the channel. If the channel is to be
      disconnected, the write operations need to be cancelled so that
      the references to the channel are released asap. Otherwise,
      spice session would be stuck waiting for the channel to finalize.
      Signed-off-by: Jakub Janků's avatarJakub Janků <jjanku@redhat.com>
      Acked-by: Frediano Ziglio's avatarFrediano Ziglio <fziglio@redhat.com>
    • Frediano Ziglio's avatar
      channel-webdav: Write mux message in a single memory block · b229bb09
      Frediano Ziglio authored
      Reduce number of write to the channel.
      This will also help making the write to socket all asynchronous
      avoiding potential blockages.
      Signed-off-by: Frediano Ziglio's avatarFrediano Ziglio <fziglio@redhat.com>
      Acked-by: Jakub Janků's avatarJakub Janků <jjanku@redhat.com>
  16. 02 Jul, 2019 1 commit