Changed error handling: ERR_MEM, ERR_BUF and ERR_RTE are seen as non-fatal, all other errors are fatal. netconns and sockets block most operations once they have seen a fatal error.

This commit is contained in:
goldsimon
2007-11-27 21:15:44 +00:00
parent b4741332e0
commit 03777ccb21
5 changed files with 34 additions and 27 deletions

View File

@@ -45,18 +45,18 @@ typedef s8_t err_t;
#define ERR_OK 0 /* No error, everything OK. */
#define ERR_MEM -1 /* Out of memory error. */
#define ERR_BUF -2 /* Buffer error. */
#define ERR_RTE -3 /* Routing problem. */
#define ERR_IS_FATAL(e) ((e) < ERR_TIMEOUT)
#define ERR_ABRT -3 /* Connection aborted. */
#define ERR_RST -4 /* Connection reset. */
#define ERR_CLSD -5 /* Connection closed. */
#define ERR_CONN -6 /* Not connected. */
#define ERR_ABRT -4 /* Connection aborted. */
#define ERR_RST -5 /* Connection reset. */
#define ERR_CLSD -6 /* Connection closed. */
#define ERR_CONN -7 /* Not connected. */
#define ERR_VAL -7 /* Illegal value. */
#define ERR_VAL -8 /* Illegal value. */
#define ERR_ARG -8 /* Illegal argument. */
#define ERR_RTE -9 /* Routing problem. */
#define ERR_ARG -9 /* Illegal argument. */
#define ERR_USE -10 /* Address in use. */