Add a new internal AUL key 52/303252/1
authorHwankyu Jhun <h.jhun@samsung.com>
Fri, 22 Dec 2023 06:34:30 +0000 (15:34 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Fri, 22 Dec 2023 06:34:30 +0000 (15:34 +0900)
The AUL_K_REQUEST_ID is added for aul requests.
The aul_launch implementation uses the key.

Change-Id: Ib90a46546e82ab013398fb683a2bbf3ff12fe681
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
include/aul_key.h
src/aul_launch.c

index 4704d58..1deefb8 100644 (file)
  * @since_tizen 8.0
  */
 #define AUL_K_MULTIPLE_INSTANCE_APPID   "__AUL_MULTIPLE_INSTANCE_APPID__"
+
+/**
+ * @brief Definition for AUL: The request ID.
+ * @since_tizen 8.0
+ */
+#define AUL_K_REQUEST_ID                "__AUL_REQUEST_ID__"
index f28ea2e..f84902b 100644 (file)
@@ -55,7 +55,7 @@ struct aul_request_s {
        int cmd;
        int clifd;
        bundle *b;
-       int seq_num;
+       int req_id;
 };
 
 typedef struct aul_request_s *aul_request_h;
@@ -389,8 +389,8 @@ static struct aul_request_s *__create_request(int cmd, int clifd, bundle *b)
        req->cmd = cmd;
        req->clifd = clifd;
        req->b = b;
-       val = bundle_get_val(b, AUL_K_SEQ_NUM);
-       req->seq_num = val ? atoi(val) : -1;
+       val = bundle_get_val(b, AUL_K_REQUEST_ID);
+       req->req_id = val ? atoi(val) : -1;
 
        return req;
 }
@@ -404,13 +404,13 @@ static int __send_result(struct aul_request_s *req, int res)
                if (__find_client_channel(req->clifd) == NULL)
                        _E("Failed to find client channel. fd(%d)", req->clifd);
 
-               aul_sock_send_result_v2(req->clifd, req->seq_num, false);
+               aul_sock_send_result_v2(req->clifd, req->req_id, false);
                ret = aul_sock_send_result_v2(req->clifd, res, false);
                g_rec_mutex_unlock(&__context.mutex);
                if (ret < 0) {
                        _E("Failed to send result. cmd(%s:%d), seq(%d)",
                                        aul_cmd_convert_to_string(req->cmd),
-                                       req->cmd, req->seq_num);
+                                       req->cmd, req->req_id);
                        return ret;
                }
        }
@@ -440,12 +440,12 @@ static gboolean __dispatch_request(gpointer data)
        if (req->cmd >= APP_START && req->cmd < ARRAY_SIZE(__dispatcher) &&
                        __dispatcher[req->cmd]) {
                _W("[%d] Command(%s:%d)",
-                               req->seq_num,
+                               req->req_id,
                                aul_cmd_convert_to_string(req->cmd), req->cmd);
                __dispatcher[req->cmd](req);
        } else {
                _E("[%d] Command(%s:%d) is not available",
-                               req->seq_num,
+                               req->req_id,
                                aul_cmd_convert_to_string(req->cmd), req->cmd);
        }