]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lwip.git/commitdiff
* err.h, err.c, sockets.c: Fix bug #23119: Reorder timeout error code to
authorjifl <jifl>
Fri, 9 May 2008 12:14:23 +0000 (12:14 +0000)
committerjifl <jifl>
Fri, 9 May 2008 12:14:23 +0000 (12:14 +0000)
    stop it being treated as a fatal error.

CHANGELOG
src/api/err.c
src/api/sockets.c
src/include/lwip/err.h

index 7382d78af06deb658dd78d5d4b2d6abfe6007446..effd6ef7eb79f0c23ba1d41846f72b19a4e50d91 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -22,6 +22,10 @@ HISTORY
 
   ++ Bugfixes:
 
+  2008-05-09 Jonathan Larmour
+  * err.h, err.c, sockets.c: Fix bug #23119: Reorder timeout error code to
+    stop it being treated as a fatal error.
+
   2008-04-15 Simon Goldschmidt
   * dhcp.c: fixed bug #22804: dhcp_stop doesn't clear NETIF_FLAG_DHCP
     (flag now cleared)
index a803a729daa0d04ada3dc81e7a0dd82996d6dac7..a90cb98c827acf3da257e5efddb113810822fe4a 100644 (file)
@@ -44,17 +44,17 @@ static const char *err_strerr[] = {
            "Ok.",                    /* ERR_OK          0  */
            "Out of memory error.",   /* ERR_MEM        -1  */
            "Buffer error.",          /* ERR_BUF        -2  */
-           "Routing problem.",       /* ERR_RTE        -3  */
-           "Connection aborted.",    /* ERR_ABRT       -4  */
-           "Connection reset.",      /* ERR_RST        -5  */
-           "Connection closed.",     /* ERR_CLSD       -6  */
-           "Not connected.",         /* ERR_CONN       -7  */
-           "Illegal value.",         /* ERR_VAL        -8  */
-           "Illegal argument.",      /* ERR_ARG        -9  */
-           "Address in use.",        /* ERR_USE        -10 */
-           "Low-level netif error.", /* ERR_IF         -11 */
-           "Already connected.",     /* ERR_ISCONN     -12 */
-           "Timeout.",               /* ERR_TIMEOUT    -13 */
+           "Timeout.",               /* ERR_TIMEOUT    -3 */
+           "Routing problem.",       /* ERR_RTE        -4  */
+           "Connection aborted.",    /* ERR_ABRT       -5  */
+           "Connection reset.",      /* ERR_RST        -6  */
+           "Connection closed.",     /* ERR_CLSD       -7  */
+           "Not connected.",         /* ERR_CONN       -8  */
+           "Illegal value.",         /* ERR_VAL        -9  */
+           "Illegal argument.",      /* ERR_ARG        -10 */
+           "Address in use.",        /* ERR_USE        -11 */
+           "Low-level netif error.", /* ERR_IF         -12 */
+           "Already connected.",     /* ERR_ISCONN     -13 */
            "Operation in progress."  /* ERR_INPROGRESS -14 */
 };
 
index 88fec4367f7a7f610b35d6093e79d1b7c360df8c..323287bda19a9cfcb644739efe7579a94ce97d7e 100644 (file)
@@ -128,17 +128,17 @@ static const int err_to_errno_table[] = {
   0,             /* ERR_OK          0      No error, everything OK. */
   ENOMEM,        /* ERR_MEM        -1      Out of memory error.     */
   ENOBUFS,       /* ERR_BUF        -2      Buffer error.            */
-  EHOSTUNREACH,  /* ERR_RTE        -3      Routing problem.         */
-  ECONNABORTED,  /* ERR_ABRT       -4      Connection aborted.      */
-  ECONNRESET,    /* ERR_RST        -5      Connection reset.        */
-  ESHUTDOWN,     /* ERR_CLSD       -6      Connection closed.       */
-  ENOTCONN,      /* ERR_CONN       -7      Not connected.           */
-  EINVAL,        /* ERR_VAL        -8      Illegal value.           */
-  EIO,           /* ERR_ARG        -9      Illegal argument.        */
-  EADDRINUSE,    /* ERR_USE        -10     Address in use.          */
-  -1,            /* ERR_IF         -11     Low-level netif error    */
-  -1,            /* ERR_ISCONN     -12     Already connected.       */
-  ETIMEDOUT,     /* ERR_TIMEOUT    -13     Timeout                  */
+  ETIMEDOUT,     /* ERR_TIMEOUT    -3      Timeout                  */
+  EHOSTUNREACH,  /* ERR_RTE        -4      Routing problem.         */
+  ECONNABORTED,  /* ERR_ABRT       -5      Connection aborted.      */
+  ECONNRESET,    /* ERR_RST        -6      Connection reset.        */
+  ESHUTDOWN,     /* ERR_CLSD       -7      Connection closed.       */
+  ENOTCONN,      /* ERR_CONN       -8      Not connected.           */
+  EINVAL,        /* ERR_VAL        -9      Illegal value.           */
+  EIO,           /* ERR_ARG        -10     Illegal argument.        */
+  EADDRINUSE,    /* ERR_USE        -11     Address in use.          */
+  -1,            /* ERR_IF         -12     Low-level netif error    */
+  -1,            /* ERR_ISCONN     -13     Already connected.       */
   EINPROGRESS    /* ERR_INPROGRESS -14     Operation in progress    */
 };
 
index e5063235268da865e1d012184dba91af16bf27e6..1d6383e7a87d7b3690af3d9b06d5cec1357c5035 100644 (file)
@@ -45,25 +45,24 @@ 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_TIMEOUT    -3    /* Timeout.                 */
+#define ERR_RTE        -4    /* Routing problem.         */
 
 #define ERR_IS_FATAL(e) ((e) < ERR_RTE)
 
-#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_ABRT       -5    /* Connection aborted.      */
+#define ERR_RST        -6    /* Connection reset.        */
+#define ERR_CLSD       -7    /* Connection closed.       */
+#define ERR_CONN       -8    /* Not connected.           */
 
-#define ERR_VAL        -8    /* Illegal value.           */
+#define ERR_VAL        -9    /* Illegal value.           */
 
-#define ERR_ARG        -   /* Illegal argument.        */
+#define ERR_ARG        -10   /* Illegal argument.        */
 
-#define ERR_USE        -10   /* Address in use.          */
+#define ERR_USE        -11   /* Address in use.          */
 
-#define ERR_IF         -11   /* Low-level netif error    */
-#define ERR_ISCONN     -12   /* Already connected.       */
-
-#define ERR_TIMEOUT    -13   /* Timeout.                 */
+#define ERR_IF         -12   /* Low-level netif error    */
+#define ERR_ISCONN     -13   /* Already connected.       */
 
 #define ERR_INPROGRESS -14   /* Operation in progress    */