1. 09 Dec, 2020 5 commits
  2. 08 Dec, 2020 2 commits
  3. 07 Dec, 2020 1 commit
  4. 04 Dec, 2020 2 commits
  5. 02 Dec, 2020 4 commits
  6. 01 Dec, 2020 2 commits
  7. 30 Nov, 2020 4 commits
  8. 27 Nov, 2020 1 commit
  9. 26 Nov, 2020 1 commit
  10. 25 Nov, 2020 2 commits
  11. 23 Nov, 2020 8 commits
    • Marco Trevisan's avatar
      identify: Use stored print to show identify information · dda3587b
      Marco Trevisan authored
      The stored print may contain more metadata, so let's use that for
      device-stored print, if available.
      dda3587b
    • Marco Trevisan's avatar
      examples: Add Identify example · fb585421
      Marco Trevisan authored
      It was the only main action left in the examples, we use the gallery
      from the device if available, otherwise the local one.
      fb585421
    • Benjamin Berg's avatar
      virtual-image: Add command to trigger device removal · 21ee241f
      Benjamin Berg authored
      This is primarily useful for fprintd testing.
      21ee241f
    • Benjamin Berg's avatar
      image-device: Fix incorrect g_free of error · 280f916a
      Benjamin Berg authored
      GError needs to be free'ed using g_error_free, fix this.
      280f916a
    • Benjamin Berg's avatar
      tests: Add device removal test · 1b5dd005
      Benjamin Berg authored
      This tests all relevant scenarios of device removal, i.e.:
       * device is not open
       * device is currently closing
       * device is open and idle
       * device is currently opening
       * device is open and active
      
      The test ensures that in all scenarios the following holds true:
       * device "removed" signal is only emitted after the action completes
       * context "device-removed" signal is only emitted after the device has
         been closed
      
      Note that the "opening" case is special. Here we confirm that a success
      from "open" will not be overriden by a FP_DEVICE_ERROR_REMOVED error, in
      order to correctly signal that the internal device state is open and it
      needs to be closed.
      1b5dd005
    • Benjamin Berg's avatar
      virtual-image: Add a notify::removed handler · 8a6f1932
      Benjamin Berg authored
      In general, we rely on the underlying transport layer to throw errors
      which will abort the current operation. This does not work for the
      virtual image device though, but we need it there for testing purposes.
      
      Add a notify::removed handler that makes things work as expected. Let it
      throw a protocol error which should not be visible to the outside.
      8a6f1932
    • Benjamin Berg's avatar
      device: Treat devices as closed even after a close failure · 0051ff63
      Benjamin Berg authored
      We require the close call, but as the underlying transport layer is
      gone, it will generally just return an error.
      
      In principle, it makes sense to think of close as a function that always
      succeeds (i.e. it makes no sense to try again). Should the device be in
      a bad state, then a subsequent open() will simply fail.
      0051ff63
    • Benjamin Berg's avatar
      Rework device removal to have a nice API · b6dd5224
      Benjamin Berg authored
      This enhances the device removal to create a well defined behaviour.
      
      Primarily, it means that:
       * "device-removed" will only be called for closed devices
       * "removed" will be called only when no operation is active
      
      Note that all actions will fail with FP_DEVICE_ERROR_REMOVED, *except*
      for open which will only return this error if it failed.
      
      Resolves: #330
      b6dd5224
  12. 18 Nov, 2020 1 commit
  13. 10 Nov, 2020 1 commit
    • Benjamin Berg's avatar
      virtual-image: Fix race condition closing new connection · fe498c56
      Benjamin Berg authored
      When a new connection came in we would close the old connection. This in
      turn would trigger a receive error causing the *new* connection to be
      closed from the error handler.
      
      Fix this by simply cancelling any pending transfers when a new
      connection comes in. Also change the error handling code to catch issues
      like partial writes correctly.
      
      This fixes an issue for the fprintd test where some tests were flaky.
      fe498c56
  14. 08 Nov, 2020 2 commits
  15. 07 Nov, 2020 4 commits