From c3e7428697af97fbca21e86102b05cb4358e3ee3 Mon Sep 17 00:00:00 2001 From: YoungHun Kim Date: Tue, 8 Apr 2025 07:24:19 +0900 Subject: [PATCH] Fix errno bug issue - Set the value before dlog totally Change-Id: I4bf4264d90d0fae3bbd521c9cd533bccf314159e --- src/CCallback.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/CCallback.cpp b/src/CCallback.cpp index 33977df..40c86bb 100644 --- a/src/CCallback.cpp +++ b/src/CCallback.cpp @@ -62,14 +62,14 @@ int CCallback::SendCallbackMessage(int cid, int pid, void *callback_data, int si snprintf(callback_path, 256, "/run/rsc_mgr/%d.%d.s2c.cb", pid, cid); if ((fd = open(callback_path, O_WRONLY | O_NONBLOCK)) < 0) { - SERVER_ERR("open error (%s), errno(%d)", callback_path, errno); *err = errno; + SERVER_ERR("open error (%s), errno(%d)", callback_path, errno); return RMS_ERROR; } if (is_symlink_file(callback_path)) { - SERVER_ERR("%s is symbolic link file", callback_path); *err = EPERM; + SERVER_ERR("%s is symbolic link file", callback_path); close(fd); return RMS_ERROR; } @@ -77,8 +77,8 @@ int CCallback::SendCallbackMessage(int cid, int pid, void *callback_data, int si ret = write(fd, callback_data, size); if (ret <= 0) { - SERVER_ERR("failed to write callback.(%s) ret(%d), errno(%d)", callback_path, ret, errno); *err = errno; + SERVER_ERR("failed to write callback.(%s) ret(%d), errno(%d)", callback_path, ret, errno); close(fd); return RMS_ERROR; } -- 2.34.1