lib: resource-monitor: Fix pass_resource_monitor_get_resource_timestamp issue 48/279348/2
authorChanwoo Choi <cw00.choi@samsung.com>
Sun, 7 Aug 2022 20:02:54 +0000 (05:02 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Sun, 7 Aug 2022 20:32:13 +0000 (05:32 +0900)
Change-Id: I6730f5451b335dd8a4759d528989d846bcf686e0
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
lib/resource-monitor/resource-monitor.c

index c21bdb9..594a8ed 100644 (file)
@@ -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;
        }