/************************************************************************* * (C) 2010 AITNET ltd - Sofia/Bulgaria - * by Michael Pounov * * $Author: misho $ * $Id: aitrpc.c,v 1.1 2010/06/18 01:48:06 misho Exp $ * *************************************************************************/ #include "global.h" #pragma GCC visibility push(hidden) // ------------------------------------------------ int rpc_Errno; char rpc_Error[STRSIZ]; #pragma GCC visibility pop // rpc_GetErrno() Get error code of last operation inline int rpc_GetErrno() { return rpc_Errno; } // rpc_GetError() Get error text of last operation inline const char * rpc_GetError() { return rpc_Error; } // rpc_SetErr() Set error to variables for internal use!!! inline void rpc_SetErr(int eno, char *estr, ...) { va_list lst; rpc_Errno = eno; memset(rpc_Error, 0, STRSIZ); va_start(lst, estr); vsnprintf(rpc_Error, STRSIZ, estr, lst); va_end(lst); } // ------------------------------------------------------------