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;
}
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;
}