Revert "Check socket status" 06/266406/1
authorHwankyu Jhun <h.jhun@samsung.com>
Thu, 11 Nov 2021 14:54:17 +0000 (23:54 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Thu, 11 Nov 2021 14:54:29 +0000 (23:54 +0900)
This reverts commit adb4e834ee2313f2049ca260da01e6c93d5c2fce.

Change-Id: I4c292b0ebe69c50c0611bb5aa56d3cfe9226b3dd

src/lib/amd_app_status.c

index 68e5001..7576b20 100644 (file)
@@ -2178,37 +2178,6 @@ static void __update_proc_status(int pid, int status, int focused, void *data)
        _app_status_update_status(app_status, status, false, true);
 }
 
-static void __check_socket_status(int pid, uid_t uid, const char *appid)
-{
-       app_status_h app_status;
-       char path[PATH_MAX];
-       char buf[12] = { 0, };
-       FILE *fp;
-
-       app_status = _app_status_find(pid);
-       if (!app_status)
-               return;
-
-       snprintf(path, sizeof(path), "/run/aul/apps/%u/%d/%s", pid, uid, appid);
-       fp = fopen(path, "r");
-       if (!fp) {
-               _E("fopen() is failed. path(%s), errno(%d)", path, errno);
-               return;
-       }
-
-       if (fgets(buf, sizeof(buf), fp) == NULL) {
-               _E("fgets() is failed. path(%s)", path);
-               fclose(fp);
-               return;
-       }
-       fclose(fp);
-
-       if (!strcmp(buf, "1")) {
-               _W("%s(%d) socket is listening", appid, pid);
-               app_status->socket_exists = true;
-       }
-}
-
 int _app_status_register_pid(int pid, const char *appid, uid_t uid)
 {
        struct appinfo *ai;
@@ -2239,7 +2208,6 @@ int _app_status_register_pid(int pid, const char *appid, uid_t uid)
        component_type = _appinfo_get_value(ai, AIT_COMPTYPE);
        _app_status_add_app_info(ai, pid, false, uid, getpid(),
                        false, NULL, false);
-       __check_socket_status(pid, uid, appid);
        _noti_send(AMD_NOTI_MSG_APP_STATUS_APP_REGISTER_PID, pid, 0, ai, NULL);
        if (component_type && strcmp(component_type, APP_TYPE_SERVICE) != 0) {
                ret = _signal_get_proc_status_async(pid,