Compare commits

...

5 Commits

Author SHA1 Message Date
Benjamin Berg 788fd9ca7a elan: Do not leak converted frames
The elan driver converts frames into a different format. These frames
are only needed to assemable the image and should be free'ed afterwards.

Fixes: #213
2019-12-16 11:41:22 +01:00
Benjamin Berg 8c5eede914 examples: Fix double device closing in manage-prints
The manage-prints command would close the device twice when the user
hits an invalid number or 'n' and no prints need to be deleted.

Simply remove the erroneous call to fix the issue.
2019-12-16 11:41:22 +01:00
Benjamin Berg 07c8481bf6 tests: Ensure objects are free'ed at the end of tests
The objects may not be garbage collected otherwise.
2019-12-16 11:41:22 +01:00
Benjamin Berg d435fc7c2c synaptics: Use local variable rather than re-fetching usb device 2019-12-16 11:41:22 +01:00
Benjamin Berg dc3b5e52ac meson: Add missing dependency on fp-enum.h for private library
The private library needs to indirectly include fp-enum.h. This
dependency was not listed anyway, resulting in a race condition during
the build process.
2019-12-16 11:39:18 +01:00
7 changed files with 15 additions and 6 deletions

View File

@ -197,9 +197,6 @@ on_list_completed (FpDevice *dev,
list_data->ret_value = EXIT_SUCCESS;
else
g_warning ("Invalid finger selected");
fp_device_close (dev, NULL, (GAsyncReadyCallback) on_device_closed,
list_data);
}
}

View File

@ -321,6 +321,8 @@ elan_submit_image (FpImageDevice *dev)
fpi_do_movement_estimation (&assembling_ctx, frames);
img = fpi_assemble_frames (&assembling_ctx, frames);
g_slist_free_full (frames, g_free);
fpi_image_device_image_captured (dev, img);
}

View File

@ -969,10 +969,10 @@ dev_probe (FpDevice *device)
return;
}
if (!g_usb_device_reset (fpi_device_get_usb_device (device), &error))
if (!g_usb_device_reset (usb_dev, &error))
goto err_close;
if (!g_usb_device_claim_interface (fpi_device_get_usb_device (device), 0, 0, &error))
if (!g_usb_device_claim_interface (usb_dev, 0, 0, &error))
goto err_close;
/* TODO: Do not do this synchronous. */

View File

@ -205,7 +205,7 @@ libnbis = static_library('nbis',
install: false)
libfprint_private = static_library('fprint-private',
sources: libfprint_private_sources + fpi_enums,
sources: libfprint_private_sources + fpi_enums + [ fp_enums_h ],
dependencies: deps,
link_with: libnbis,
install: false)

View File

@ -17,6 +17,7 @@ c.enumerate()
devices = c.get_devices()
d = devices[0]
del devices
d.open_sync()
@ -24,6 +25,9 @@ img = d.capture_sync(True)
d.close_sync()
del d
del c
width = img.get_width()
height = img.get_height()

View File

@ -11,6 +11,7 @@ c.enumerate()
devices = c.get_devices()
d = devices[0]
del devices
assert d.get_driver() == "synaptics"
@ -40,3 +41,6 @@ print("deleting")
d.delete_print_sync(p)
print("delete done")
d.close_sync()
del d
del c

View File

@ -83,6 +83,8 @@ class VirtualImage(unittest.TestCase):
@classmethod
def tearDownClass(cls):
shutil.rmtree(cls.tmpdir)
del cls.dev
del cls.ctx
def setUp(self):
self.dev.open_sync()