From 0d79aaf8700942c63b7c24d35376bdb2e55dd29b Mon Sep 17 00:00:00 2001 From: YuQing <384681@qq.com> Date: Tue, 20 Apr 2021 10:15:56 +0800 Subject: [PATCH] add macro SF_SESSION_ERROR_NOT_EXIST --- src/sf_define.h | 1 + src/sf_util.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/sf_define.h b/src/sf_define.h index 63ea672..fcc0692 100644 --- a/src/sf_define.h +++ b/src/sf_define.h @@ -40,6 +40,7 @@ #define SF_NIO_TASK_STAGE_FETCH(task) task->nio_stages.current +#define SF_SESSION_ERROR_NOT_EXIST 9992 #define SF_CLUSTER_ERROR_LEADER_VERSION_INCONSISTENT 9997 #define SF_CLUSTER_ERROR_BINLOG_INCONSISTENT 9998 #define SF_CLUSTER_ERROR_LEADER_INCONSISTENT 9999 diff --git a/src/sf_util.h b/src/sf_util.h index 9f7a2d4..3499962 100644 --- a/src/sf_util.h +++ b/src/sf_util.h @@ -125,6 +125,8 @@ static inline int sf_localize_errno(const int errnum) return EOPNOTSUPP; case SF_ERROR_ENODATA: return ENODATA; + case SF_SESSION_ERROR_NOT_EXIST: + return EPERM; default: return errnum; }