PARA_ERROR(BUSY, "table is busy"), \
PARA_ERROR(SHORT_TABLE, "table too short"), \
PARA_ERROR(NO_MAGIC, "missing table header magic"), \
PARA_ERROR(BUSY, "table is busy"), \
PARA_ERROR(SHORT_TABLE, "table too short"), \
PARA_ERROR(NO_MAGIC, "missing table header magic"), \
PARA_ERROR(BAD_COLUMN_NUM, "invalid column number"), \
PARA_ERROR(BAD_TABLE_FLAGS, "invalid flags in table description"), \
PARA_ERROR(BAD_ROW, "invalid row"), \
PARA_ERROR(BAD_COLUMN_NUM, "invalid column number"), \
PARA_ERROR(BAD_TABLE_FLAGS, "invalid flags in table description"), \
PARA_ERROR(BAD_ROW, "invalid row"), \
#define AFS_ERRORS \
PARA_ERROR(BAD_TABLE_NAME, "invalid table"), \
PARA_ERROR(INPUT_TOO_LARGE, "input too large for stdin command"), \
PARA_ERROR(AFS_SYNTAX, "afs syntax error"), \
PARA_ERROR(AFS_SIGNAL, "afs caught deadly signal"), \
#define AFS_ERRORS \
PARA_ERROR(BAD_TABLE_NAME, "invalid table"), \
PARA_ERROR(INPUT_TOO_LARGE, "input too large for stdin command"), \
PARA_ERROR(AFS_SYNTAX, "afs syntax error"), \
PARA_ERROR(AFS_SIGNAL, "afs caught deadly signal"), \
+ PARA_ERROR(AFS_SOCKET, "afs socket not writable"), \
+ PARA_ERROR(AFS_PARENT_DIED, "fatal: server process terminated"), \
+ PARA_ERROR(AFS_SHORT_READ, "short read from afs socket"), \
#define MOOD_ERRORS \
PARA_ERROR(MOOD_SYNTAX, "mood syntax error"), \
PARA_ERROR(NO_MOOD, "no mood available"), \
PARA_ERROR(MOOD_LOADED, "mood loaded"), \
#define MOOD_ERRORS \
PARA_ERROR(MOOD_SYNTAX, "mood syntax error"), \
PARA_ERROR(NO_MOOD, "no mood available"), \
PARA_ERROR(MOOD_LOADED, "mood loaded"), \
#define ATTRIBUTE_ERRORS \
PARA_ERROR(ATTR_SYNTAX, "attribute syntax error"), \
PARA_ERROR(NO_ATTRIBUTES, "no attributes defined yet"), \
#define ATTRIBUTE_ERRORS \
PARA_ERROR(ATTR_SYNTAX, "attribute syntax error"), \
PARA_ERROR(NO_ATTRIBUTES, "no attributes defined yet"), \
PARA_ERROR(LOCALTIME, "localtime() failed"), \
PARA_ERROR(STRFTIME, "strftime() failed"), \
PARA_ERROR(BAD_PATH, "invalid path"), \
PARA_ERROR(LOCALTIME, "localtime() failed"), \
PARA_ERROR(STRFTIME, "strftime() failed"), \
PARA_ERROR(BAD_PATH, "invalid path"), \
#define CLIENT_COMMON_ERRORS \
PARA_ERROR(CLIENT_SYNTAX, "syntax error"), \
PARA_ERROR(INVALID_CHALLENGE, "did not receive valid challenge"), \
#define CLIENT_COMMON_ERRORS \
PARA_ERROR(CLIENT_SYNTAX, "syntax error"), \
PARA_ERROR(INVALID_CHALLENGE, "did not receive valid challenge"), \
- PARA_ERROR(SEND, "send error"), \
- PARA_ERROR(RECV, "receive error"), \
- PARA_ERROR(SOCKET, "socket error"), \
- PARA_ERROR(ACCEPT, "accept error"), \
- PARA_ERROR(SETSOCKOPT, "failed to set socket options"), \
- PARA_ERROR(BIND, "bind error"), \
PARA_ERROR(NAME_TOO_LONG, "name too long for struct sockaddr_un"), \
PARA_ERROR(CHMOD, "failed to set socket mode"), \
PARA_ERROR(SENDMSG, "sendmsg() failed"), \
PARA_ERROR(RECVMSG, "recvmsg() failed"), \
PARA_ERROR(SCM_CREDENTIALS, "did not receive SCM credentials"), \
PARA_ERROR(NAME_TOO_LONG, "name too long for struct sockaddr_un"), \
PARA_ERROR(CHMOD, "failed to set socket mode"), \
PARA_ERROR(SENDMSG, "sendmsg() failed"), \
PARA_ERROR(RECVMSG, "recvmsg() failed"), \
PARA_ERROR(SCM_CREDENTIALS, "did not receive SCM credentials"), \
#define ORTP_RECV_ERRORS \
PARA_ERROR(MSG_TO_BUF, "failed to extract rtp packet"), \
#define ORTP_RECV_ERRORS \
PARA_ERROR(MSG_TO_BUF, "failed to extract rtp packet"), \
PARA_ERROR(TOO_MANY_BAD_CHUNKS, "too many consecutive bad chunks"), \
PARA_ERROR(INVALID_HEADER, "invalid header packet"), \
PARA_ERROR(TOO_MANY_BAD_CHUNKS, "too many consecutive bad chunks"), \
PARA_ERROR(INVALID_HEADER, "invalid header packet"), \
PARA_ERROR(ORTP_RECV_EOF, "ortp_recv: end of file"), \
#define HTTP_RECV_ERRORS \
PARA_ERROR(HTTP_RECV_EOF, "http_recv: end of file"), \
PARA_ERROR(ORTP_RECV_EOF, "ortp_recv: end of file"), \
#define HTTP_RECV_ERRORS \
PARA_ERROR(HTTP_RECV_EOF, "http_recv: end of file"), \
#define RECV_COMMON_ERRORS \
PARA_ERROR(RECV_SYNTAX, "recv syntax error"), \
#define RECV_COMMON_ERRORS \
PARA_ERROR(RECV_SYNTAX, "recv syntax error"), \
PARA_ERROR(AUDIO_FORMAT, "audio format not recognized"), \
PARA_ERROR(CHUNK, "unable to get chunk"), \
PARA_ERROR(SHORT_AFS_READ, "short read from afs socket"), \
PARA_ERROR(AUDIO_FORMAT, "audio format not recognized"), \
PARA_ERROR(CHUNK, "unable to get chunk"), \
PARA_ERROR(SHORT_AFS_READ, "short read from afs socket"), \
#define CHUNK_QUEUE_ERRORS \
PARA_ERROR(QUEUE, "packet queue overrun"), \
#define CHUNK_QUEUE_ERRORS \
PARA_ERROR(QUEUE, "packet queue overrun"), \
*
* As zero should not be an error, we define a dummy enum entry with value
* 2**ss. That lets the real errors start at 2**ss + 1.
*
* As zero should not be an error, we define a dummy enum entry with value
* 2**ss. That lets the real errors start at 2**ss + 1.
*
* Easy, it's just \a num / 2**8.
*/
#define ERRNUM_TO_SS(num) ((num) >> SS_SHIFT)
/**
*
* Easy, it's just \a num / 2**8.
*/
#define ERRNUM_TO_SS(num) ((num) >> SS_SHIFT)
/**
*/
#define PARA_STRERROR(num) IS_SYSTEM_ERROR(num)? \
strerror((num) & ((1 << SYSTEM_ERROR_BIT) - 1)) : \
para_errlist[ERRNUM_TO_SS(num)] [ERRNUM_TO_INDEX(num)]
/**
*/
#define PARA_STRERROR(num) IS_SYSTEM_ERROR(num)? \
strerror((num) & ((1 << SYSTEM_ERROR_BIT) - 1)) : \
para_errlist[ERRNUM_TO_SS(num)] [ERRNUM_TO_INDEX(num)]
/**
- * Each executable needs only the error lists of those subssystems it is
- * actually linked with. We always reserve space for NUM_SS char ** pointers,
+ * Each executable needs only the error lists of those subsystems it is
+ * actually linked with. We always reserve space for NUM_SS char pointers,
* but only init those of the needed subsystems. This macro is used by macros
* in config.h (generated by configure).
*/
* but only init those of the needed subsystems. This macro is used by macros
* in config.h (generated by configure).
*/