/*************************************************************************
* (C) 2010 AITNET ltd - Sofia/Bulgaria - <misho@aitbg.com>
* by Michael Pounov <misho@openbsd-bg.org>
*
* $Author: misho $
* $Id: aitrpc.c,v 1.1.1.1.2.3 2010/06/24 15:01:19 misho Exp $
*
*************************************************************************/
#include "global.h"
#pragma GCC visibility push(hidden)
// ------------------------------------------------
int rpc_Kill, blob_Kill;
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);
}
// ------------------------------------------------------------
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>