Fix aul daemons path 61/290961/2
authorMateusz Moscicki <m.moscicki2@partner.samsung.com>
Wed, 5 Apr 2023 19:23:01 +0000 (21:23 +0200)
committerHwankyu Jhun <h.jhun@samsung.com>
Wed, 5 Apr 2023 23:48:10 +0000 (23:48 +0000)
The launchpad-process-pool socket path must be
"/run/aul/daemons/<uid>/.launchpad-process-pool-sock".

Change-Id: I89e2df902a9b83af863aa13b919e15eea8e942e0

src/launchpad-process-pool/launchpad.cc

index 6885aed..fcc11df 100644 (file)
@@ -2124,13 +2124,14 @@ static void HandleMemoryStatusChangedEvent(bool low_memory) {
 namespace launchpad {
 namespace {
 
+constexpr const char kRunAulDaemonsPath[] = "/run/aul/daemons/";
 constexpr const char kLaunchpadProcessPoolSock[] =
     ".launchpad-process-pool-sock";
 const int kReceivedBufferSize = 131071;
 const int kMaxPendingConnection = 128;
 
 int GetLaunchpadFdFromSystemd() {
-  const std::string path = "/run/aul/daemons/" + std::to_string(getuid()) +
+  const std::string path = kRunAulDaemonsPath + std::to_string(getuid()) +
       "/" + std::string(kLaunchpadProcessPoolSock);
   int fds = sd_listen_fds(0);
   for (int fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + fds; ++fd) {
@@ -2162,7 +2163,7 @@ ServerSocket* GetLaunchpadSocket() {
     return new ServerSocket(fd);
 
   auto* socket = new ServerSocket();
-  const std::string endpoint = "/run/aul/daeons/" + std::to_string(getuid()) +
+  const std::string endpoint = kRunAulDaemonsPath + std::to_string(getuid()) +
       kLaunchpadProcessPoolSock;
   socket->Bind(endpoint);
   socket->SetReceiveBufferSize(kReceivedBufferSize);