From d40311da1757bf8188e8a84f4d5512a9a12e414a Mon Sep 17 00:00:00 2001 From: cryptozoidberg Date: Mon, 10 Mar 2025 13:59:19 +0400 Subject: [PATCH] put levin return code to right place --- contrib/epee/include/net/levin_base.h | 34 +++++++++++++++------------ 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/contrib/epee/include/net/levin_base.h b/contrib/epee/include/net/levin_base.h index 1d7ccb44..3d7e927d 100644 --- a/contrib/epee/include/net/levin_base.h +++ b/contrib/epee/include/net/levin_base.h @@ -33,6 +33,25 @@ #define LEVIN_SIGNATURE 0x0101010101012101LL //Bender's nightmare + + +#define LEVIN_OK 0 +#define LEVIN_ERROR_CONNECTION -1 +#define LEVIN_ERROR_CONNECTION_NOT_FOUND -2 +#define LEVIN_ERROR_CONNECTION_DESTROYED -3 +#define LEVIN_ERROR_CONNECTION_TIMEDOUT -4 +#define LEVIN_ERROR_CONNECTION_NO_DUPLEX_PROTOCOL -5 +#define LEVIN_ERROR_CONNECTION_HANDLER_NOT_DEFINED -6 +#define LEVIN_ERROR_FORMAT -7 +#define LEVIN_ERROR_EXCEPTION -8 +#define LEVIN_ERROR_UNKNOWN_ERROR -9 +#define LEVIN_ERROR_INTERNAL -10 +#define LEVIN_ERROR_PROTOCOL_INCONSISTENT -11 +#define LEVIN_ERROR_NET_ERROR -12 +#define LEVIN_ERROR_SIGNATURE_MISMATCH -13 + + + namespace epee { namespace levin @@ -96,21 +115,6 @@ namespace levin }; -#define LEVIN_OK 0 -#define LEVIN_ERROR_CONNECTION -1 -#define LEVIN_ERROR_CONNECTION_NOT_FOUND -2 -#define LEVIN_ERROR_CONNECTION_DESTROYED -3 -#define LEVIN_ERROR_CONNECTION_TIMEDOUT -4 -#define LEVIN_ERROR_CONNECTION_NO_DUPLEX_PROTOCOL -5 -#define LEVIN_ERROR_CONNECTION_HANDLER_NOT_DEFINED -6 -#define LEVIN_ERROR_FORMAT -7 -#define LEVIN_ERROR_EXCEPTION -8 -#define LEVIN_ERROR_UNKNOWN_ERROR -9 -#define LEVIN_ERROR_INTERNAL -10 -#define LEVIN_ERROR_PROTOCOL_INCONSISTENT -11 -#define LEVIN_ERROR_NET_ERROR -12 -#define LEVIN_ERROR_SIGNATURE_MISMATCH -13 - #define DESCRIBE_RET_CODE(code) case code: return #code; inline const char* get_err_descr(int err)