Add IPC sync result for SerialPort::Write() 81/14081/1
authorHyunbin Lee <hyunbin.lee@samsung.com>
Wed, 6 Nov 2013 01:30:20 +0000 (10:30 +0900)
committerHyunbin Lee <hyunbin.lee@samsung.com>
Mon, 23 Dec 2013 06:45:25 +0000 (15:45 +0900)
Change-Id: Ifa5dbdbd4912c24050eadc72d66722f216a00521
Signed-off-by: Hyunbin Lee <hyunbin.lee@samsung.com>
plugins/accessory-condition-handler/AccessoryMonitor.cpp

index efe1d6a..bf5e2d5 100644 (file)
@@ -258,7 +258,11 @@ OnRequestOccured(AppId appId, int pid, ArrayList* pRequest, ArrayList* pResponse
                                        length++;
                                }
                        }
-                       pAccessoryMonitor->GetDataRouter()->Write(buffer, length);
+                       r = pAccessoryMonitor->GetDataRouter()->Write(buffer, length);
+                       SysTryLog(NID_SYS, !IsFailed(r), "[%s] _DataRouter::Write() failed.", GetErrorMessage(r));
+
+                       String* pResult = new (std::nothrow) String(GetErrorMessage(r));
+                       pResponse->Add(*pResult);
 
                        delete [] buffer;
                }
@@ -275,7 +279,7 @@ OnRequestOccured(AppId appId, int pid, ArrayList* pRequest, ArrayList* pResponse
 CATCH:
        SetLastResult(r);
 
-       if(r == E_SUCCESS)
+       if (r == E_SUCCESS)
                return true;
        else
                return false;