From d9567002e458fca4f289d84bb3cb49d9d97585e7 Mon Sep 17 00:00:00 2001
From: Vasily Khoruzhick <anarsoul@gmail.com>
Date: Wed, 1 Apr 2015 13:39:54 +0300
Subject: [PATCH] imgdev: reset action_result after reporting it

Otherwise we end up in reporting the same result on next iteration.
---
 libfprint/imgdev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libfprint/imgdev.c b/libfprint/imgdev.c
index 4d9000a..4408c23 100644
--- a/libfprint/imgdev.c
+++ b/libfprint/imgdev.c
@@ -164,15 +164,18 @@ void fpi_imgdev_report_finger_status(struct fp_img_dev *imgdev,
 		break;
 	case IMG_ACTION_VERIFY:
 		fpi_drvcb_report_verify_result(imgdev->dev, r, img);
+		imgdev->action_result = 0;
 		fp_print_data_free(data);
 		break;
 	case IMG_ACTION_IDENTIFY:
 		fpi_drvcb_report_identify_result(imgdev->dev, r,
 			imgdev->identify_match_offset, img);
+		imgdev->action_result = 0;
 		fp_print_data_free(data);
 		break;
 	case IMG_ACTION_CAPTURE:
 		fpi_drvcb_report_capture_result(imgdev->dev, r, img);
+		imgdev->action_result = 0;
 		break;
 	default:
 		fp_err("unhandled action %d", imgdev->action);