From cbaaadba5ff71b5f90e803be814951bc6acb7e46 Mon Sep 17 00:00:00 2001 From: Chanwoo Choi Date: Mon, 8 Aug 2022 05:02:54 +0900 Subject: [PATCH] lib: resource-monitor: Fix pass_resource_monitor_get_resource_timestamp issue Change-Id: I6730f5451b335dd8a4759d528989d846bcf686e0 Signed-off-by: Chanwoo Choi --- lib/resource-monitor/resource-monitor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/resource-monitor/resource-monitor.c b/lib/resource-monitor/resource-monitor.c index c21bdb9..594a8ed 100644 --- a/lib/resource-monitor/resource-monitor.c +++ b/lib/resource-monitor/resource-monitor.c @@ -964,10 +964,10 @@ int pass_resource_monitor_get_resource_timestamp(int id, int res_id, int64_t *st } buffer[buffer_len] = '\0'; - if (sscanf(buffer, "%d$%"PRId64"$%"PRId64"$%d", &response_req, start, end, &ret) < 3) + if (sscanf(buffer, "%d$%"PRId64"$%"PRId64"$%d", &response_req, start, end, &ret) < 4) return -EINVAL; - if (response_req != REQUEST_GET_VALUE_INT64) { + if (response_req != REQUEST_GET_RESOURCE_TS) { _E("[libpass] wrong response"); return -EINVAL; } -- 2.34.1