Build issue fix
authorJoohyun Kim <joohyune.kim@samsung.com>
Fri, 5 Apr 2013 06:14:12 +0000 (15:14 +0900)
committerJoohyun Kim <joohyune.kim@samsung.com>
Fri, 5 Apr 2013 06:14:12 +0000 (15:14 +0900)
Change-Id: Ia1e4c7c50ca4f1413bcc3c6d58b2313e0863d2ca
Signed-off-by: Joohyun Kim <joohyune.kim@samsung.com>
src/system/FSys_CommunicationDispatcherClient.cpp

index bc7d8e6..7197c17 100644 (file)
@@ -21,7 +21,8 @@
  */
 
 #include <FBaseSysLog.h>
-
+#include <unistd.h>
+#include <sys/types.h>
 #include <FIo_AppServiceIpcMessages.h>
 
 #include "FSys_CommunicationDispatcherClient.h"
@@ -44,15 +45,19 @@ _CommunicationDispatcherClient::_CommunicationDispatcherClient()
        __communicationDispatcherClientList.Construct(0, 0, __strHashCodeProvider, __strComparer);
 
        result r = E_SUCCESS;
-       __pIpcClient = new (std::nothrow) _IpcClient();
-       SysTryCatch(NID_SYS, __pIpcClient != null, , r, "It is failed to create IPC client");
-
-       r = __pIpcClient->Construct(_COMMUNICATION_DISPATCHER_IPC_ID, this);
-       if(r != E_SUCCESS)
-               ipcReady = false;
-       else
-               ipcReady = true;
+
+       if(getuid() != 0)
+       {
+               __pIpcClient = new (std::nothrow) _IpcClient();
+               SysTryCatch(NID_SYS, __pIpcClient != null, , r, "It is failed to create IPC client");
+
+               r = __pIpcClient->Construct(_COMMUNICATION_DISPATCHER_IPC_ID, this);
+               if(r != E_SUCCESS)
+                       ipcReady = false;
+               else
+                       ipcReady = true;
        SysTryCatch(NID_SYS, r == E_SUCCESS, , r, "Propagated. [%s]", GetErrorMessage(r));
+       }
 
 CATCH:
        SetLastResult(r);