Summary: | fixes to async state machines | ||
---|---|---|---|
Product: | libfprint | Reporter: | Timo Teräs <timo.teras> |
Component: | libfprint | Assignee: | libfprint-bugs |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | anarsoul |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
uru4000: fix cancelling of imaging from error callback
imgdev: fix cancelling of enrollment from stage_completed callback Update AUTHORS imgdev: fix cancelling of enrollment from stage_completed callback [v2] imgdev: fix cancelling of enrollment from stage_completed callback [v3] |
Description
Timo Teräs
2012-12-03 08:02:57 UTC
Created attachment 70954 [details] [review] imgdev: fix cancelling of enrollment from stage_completed callback Created attachment 70955 [details] [review] Update AUTHORS Comment on attachment 70953 [details] [review] uru4000: fix cancelling of imaging from error callback Review of attachment 70953 [details] [review]: ----------------------------------------------------------------- Looks OK Comment on attachment 70955 [details] [review] Update AUTHORS Review of attachment 70955 [details] [review]: ----------------------------------------------------------------- Looks OK Comment on attachment 70954 [details] [review] imgdev: fix cancelling of enrollment from stage_completed callback Review of attachment 70954 [details] [review]: ----------------------------------------------------------------- -- ::: libfprint/imgdev.c @@ +146,5 @@ > fp_dbg("reporting enroll result"); > fpi_drvcb_enroll_stage_completed(imgdev->dev, r, data, img); > if (r > 0 && r != FP_ENROLL_COMPLETE && r != FP_ENROLL_FAIL) { > + /* the callback above can cancel enrollment */ > + if (imgdev->action != IMG_ACTION_ENROLL) It would be better to check this condition in upper if (In reply to comment #5) > Comment on attachment 70954 [details] [review] [review] > imgdev: fix cancelling of enrollment from stage_completed callback > > Review of attachment 70954 [details] [review] [review]: > ----------------------------------------------------------------- > > ::: libfprint/imgdev.c > @@ +146,5 @@ > > fp_dbg("reporting enroll result"); > > fpi_drvcb_enroll_stage_completed(imgdev->dev, r, data, img); > > if (r > 0 && r != FP_ENROLL_COMPLETE && r != FP_ENROLL_FAIL) { > > + /* the callback above can cancel enrollment */ > > + if (imgdev->action != IMG_ACTION_ENROLL) > > It would be better to check this condition in upper if Should I just move the new if block above, or merge the new test as part of the existing if test? (In reply to comment #6) > Should I just move the new if block above, or merge the new test as part of > the existing if test? I prefer merging, and it worth adding some comment here that fpi_drvcb_enroll_stage_completed() can change device action. Created attachment 70961 [details] [review] imgdev: fix cancelling of enrollment from stage_completed callback [v2] Updated patch per review comments. (In reply to comment #8) > Created attachment 70961 [details] [review] [review] > imgdev: fix cancelling of enrollment from stage_completed callback [v2] > > Updated patch per review comments. Shouldn't it be (imgdev->action == IMG_ACTION_ENROLL)? Created attachment 70963 [details] [review] imgdev: fix cancelling of enrollment from stage_completed callback [v3] Duh. Fixed the obvious cut'n'paste problem as observed in review. Note to self: never post patch one minute before going to lunch... (In reply to comment #10) > Created attachment 70963 [details] [review] [review] > imgdev: fix cancelling of enrollment from stage_completed callback [v3] > > Duh. Fixed the obvious cut'n'paste problem as observed in review. > Note to self: never post patch one minute before going to lunch... Looks OK Comment on attachment 70953 [details] [review] uru4000: fix cancelling of imaging from error callback Review of attachment 70953 [details] [review]: ----------------------------------------------------------------- OK. Comment on attachment 70955 [details] [review] Update AUTHORS Review of attachment 70955 [details] [review]: ----------------------------------------------------------------- Looks like this isn't UTF-8 though. Comment on attachment 70963 [details] [review] imgdev: fix cancelling of enrollment from stage_completed callback [v3] Review of attachment 70963 [details] [review]: ----------------------------------------------------------------- Sure. All pushed, thanks. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.