Modify error code of aul socket 70/296170/1
authorHwankyu Jhun <h.jhun@samsung.com>
Fri, 21 Jul 2023 01:39:14 +0000 (10:39 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Fri, 21 Jul 2023 01:39:14 +0000 (10:39 +0900)
When the amd socket is not ready, the errno value is ENOENT.
After calling aul_error_convert() function, the error is changed to AUL_R_ENOAPP.
It means the application is not found error. The error should be AUL_E_ECOMM.
This patch changes the error code to -ECOMMM.

Change-Id: Ic6d66d85bb4e37e41366a40bbe2abc1980b98dee
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/aul_sock.cc

index 3b87bac..eea2667 100644 (file)
@@ -223,7 +223,7 @@ int SendAndReceive(int pid, uid_t uid, int cmd, unsigned char* data,
     ret = SendAndReceive(&client, cmd, data, datalen, opt);
   } catch (const Exception& e) {
     _E("Exception occurs. error(%d)", e.GetErrorCode());
-    return e.GetErrorCode();
+    return -ECOMM;
   }
 
   return ret;
@@ -243,7 +243,7 @@ int SendAndReceiveWithTimeout(int pid, uid_t uid, int cmd, unsigned char* data,
     ret = SendAndReceive(&client, cmd, data, datalen, opt);
   } catch (const Exception& e) {
     _E("Exception occurs. error(%d)", e.GetErrorCode());
-    return e.GetErrorCode();
+    return -ECOMM;
   }
 
   return ret;