diff --git a/src/sf_define.h b/src/sf_define.h index 2c9e7a7..58c04cd 100644 --- a/src/sf_define.h +++ b/src/sf_define.h @@ -54,7 +54,8 @@ #define SF_RETRIABLE_ERROR_CHANNEL_INVALID 9915 //client should re-setup channel //std errno wrapper for crossing platform -#define SF_ERROR_EINVAL 8811 +#define SF_ERROR_EBUSY 8816 +#define SF_ERROR_EINVAL 8822 #define SF_ERROR_EAGAIN 8835 #define SF_ERROR_EOVERFLOW 8884 diff --git a/src/sf_util.h b/src/sf_util.h index 42fed5b..1d093d6 100644 --- a/src/sf_util.h +++ b/src/sf_util.h @@ -93,6 +93,8 @@ static inline void sf_setup_schedule(struct log_context *pContext, static inline int sf_unify_errno(const int errnum) { switch (errnum) { + case EBUSY: + return SF_ERROR_EBUSY; case EINVAL: return SF_ERROR_EINVAL; case EAGAIN: @@ -107,6 +109,8 @@ static inline int sf_unify_errno(const int errnum) static inline int sf_localize_errno(const int errnum) { switch (errnum) { + case SF_ERROR_EBUSY: + return EBUSY; case SF_ERROR_EINVAL: return EINVAL; case SF_ERROR_EAGAIN: