From 4c659daa57e623da63c6287372db485800944a63 Mon Sep 17 00:00:00 2001 From: Alexander Vdolainen Date: Mon, 8 Feb 2016 22:21:05 +0200 Subject: [PATCH] Added new error types; --- include/sxmp/errno.h | 46 +++++++++++++++++++++++--------------------- lib/link.c | 4 +++- 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/include/sxmp/errno.h b/include/sxmp/errno.h index 4b4c62d..8bd61ea 100644 --- a/include/sxmp/errno.h +++ b/include/sxmp/errno.h @@ -28,28 +28,30 @@ #define __SXMP_EPREFIX 200 -#define SXE_SUCCESS 200 -#define SXE_FAILED 201 -#define SXE_ENOMEM 202 -#define SXE_BADPROTO 203 -#define SXE_ENORPC 204 -#define SXE_EPERM 205 -#define SXE_TOOLONG 206 -#define SXE_EBUSY 207 -#define SXE_WOULDBLOCK 208 -#define SXE_LINKERROR 209 -#define SXE_NOSUCHMSG 210 -#define SXE_NOSUCHCHAN 211 -#define SXE_ETIMEDOUT 212 -#define SXE_IGNORED 213 -#define SXE_REPLYREQ 214 -#define SXE_RAPIDMSG 215 -#define SXE_ESSL 216 -#define SXE_NOCHANNELS 217 -#define SXE_MCHANNELS 218 -#define SXE_MMESSAGES 219 -#define SXE_LINKBROKEN 220 -#define SXE_INVALINDEX 221 +#define SXE_SUCCESS 200 +#define SXE_FAILED 201 +#define SXE_ENOMEM 202 +#define SXE_BADPROTO 203 +#define SXE_ENORPC 204 +#define SXE_EPERM 205 +#define SXE_TOOLONG 206 +#define SXE_EBUSY 207 +#define SXE_WOULDBLOCK 208 +#define SXE_LINKERROR 209 +#define SXE_NOSUCHMSG 210 +#define SXE_NOSUCHCHAN 211 +#define SXE_ETIMEDOUT 212 +#define SXE_IGNORED 213 +#define SXE_REPLYREQ 214 +#define SXE_RAPIDMSG 215 +#define SXE_ESSL 216 +#define SXE_NOCHANNELS 217 +#define SXE_MCHANNELS 218 +#define SXE_MMESSAGES 219 +#define SXE_LINKBROKEN 220 +#define SXE_INVALINDEX 221 +#define SXE_NOSUCHSTREAMTYPE 222 +#define SXE_EOS 223 const char *sxmpl_errno2cstr(int); diff --git a/lib/link.c b/lib/link.c index b175375..b796c7e 100644 --- a/lib/link.c +++ b/lib/link.c @@ -351,9 +351,11 @@ static struct __scerrcode __lerr[] = { {SXE_MMESSAGES, "Active messages limit exceed"}, {SXE_LINKBROKEN, "Connection link was broken"}, {SXE_INVALINDEX, "Invalid index given"}, + {SXE_NOSUCHSTREAMTYPE, "No such stream type exist"}, + {SXE_EOS, "End of stream reached"}, }; -const char *sntll_errno2cstr(int ec) +const char *sxmpl_errno2cstr(int ec) { return __lerr[ec - __SXMP_EPREFIX].desc; }