When getting app startup signal from a child process of launchpad, AMD
tries to connect to the app socket. When calling the aul_initialize() function,
the application sends the APP_NOTIFY_START request to AMD.
While handling the APP_NOTIFY_START command, AMD sets the flag that is
socket_exists of the app status handle.
After this patch is applied, AMD checks whether the socket exists or not
before sending the app request to the application.
Change-Id: I6974e8684f6b5fec3adc0e4fcd63ec4946f14866
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
#include <bundle_cpp.h>
#include <parcel.hh>
-#include "lib/amd_app_status.h"
#include "lib/amd_util.h"
#include "lib/socket/client_socket.hh"
auto& broker = AppRequestBroker::GetInst();
auto channel = broker.FindClientChannel(request->pid);
if (channel == nullptr) {
- app_status_h app_status = _app_status_find(request->pid);
- if (app_status == nullptr)
- return -EINVAL;
-
- if (!_app_status_socket_exists(app_status))
- return -ECOMM;
-
channel = broker.CreateClientChannel(request->pid, request->uid);
if (channel == nullptr)
return -ECOMM;
.data = data
};
+ if (!_app_status_socket_exists(_app_status_find(pid)))
+ return -ECOMM;
+
info = __create_reply_info(pid, uid, cmd, clifd, data);
if (!info)
return -ENOMEM;