monitor: request-server: add two function call sites and prototypes
authorSung-hun Kim <sfoon.kim@samsung.com>
Fri, 11 Feb 2022 12:48:30 +0000 (21:48 +0900)
committerSung-hun Kim <sfoon.kim@samsung.com>
Mon, 21 Feb 2022 00:45:52 +0000 (09:45 +0900)
Change-Id: I20540b09e16578a65efec8ec22fb2e969bdcef8d
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
src/monitor/request-server.c

index 3d4571bc94836700d5247959a38d0381ead80356..eea9e14927ac8ddb58c0895373435a6db68a4e2c 100644 (file)
@@ -231,6 +231,17 @@ static void handle_request_in_stopped(struct request_client *client, char *buffe
 
 }
 
+static void handle_request_update(struct request_client *client, int resource_type)
+{
+
+}
+
+static void handle_request_get_value_int(struct request_client *client,
+                               int resource_type, u_int64_t attr)
+{
+
+}
+
 static void handle_request_in_running(struct request_client *client, char *buffer)
 {
        char response[10];
@@ -239,6 +250,8 @@ static void handle_request_in_running(struct request_client *client, char *buffe
        char *tokens[REQUEST_TOKEN_MAX];
        int request_type;
        int id;
+       int resource_type;
+       u_int64_t attr;
 
        nr_tokens = buffer_tokenize(buffer, tokens);
        if (nr_tokens < 0) {
@@ -268,7 +281,14 @@ static void handle_request_in_running(struct request_client *client, char *buffe
 
        switch (request_type) {
        case REQUEST_UPDATE:
+               resource_type = atoi(tokens[2]);
+               handle_request_update(client, resource_type);
+               break;
        case REQUEST_GET_VALUE_INT:
+               resource_type = atoi(tokens[2]);
+               attr = strtoul(tokens[3], NULL, 16);
+               handle_request_get_value_int(client, resource_type, attr);
+               break;
        case REQUEST_STOP:
                /**
                 * Format of REQUEST_EXIT: