From d8b0625e21ce262e8e8a65e36c4b26ee0f35509f Mon Sep 17 00:00:00 2001 From: adamdunkels Date: Thu, 4 Feb 2010 21:14:45 +0000 Subject: [PATCH] Bugfix: lastport must be defines both when UIP_ACTIVE_OPEN or UIP_UDP are defined (thanks Oliver!) --- core/net/uip.c | 6 +++--- core/net/uip6.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/net/uip.c b/core/net/uip.c index 6f2f56c56..46d85ccb8 100644 --- a/core/net/uip.c +++ b/core/net/uip.c @@ -41,7 +41,7 @@ * * This file is part of the uIP TCP/IP stack. * - * $Id: uip.c,v 1.19 2010/02/04 11:17:42 adamdunkels Exp $ + * $Id: uip.c,v 1.20 2010/02/04 21:14:45 adamdunkels Exp $ * */ @@ -174,10 +174,10 @@ void uip_setipid(u16_t id) { ipid = id; } static u8_t iss[4]; /* The iss variable is used for the TCP initial sequence number. */ -#if UIP_ACTIVE_OPEN +#if UIP_ACTIVE_OPEN || UIP_UDP static u16_t lastport; /* Keeps track of the last port used for a new connection. */ -#endif /* UIP_ACTIVE_OPEN */ +#endif /* UIP_ACTIVE_OPEN || UIP_UDP */ /* Temporary variables. */ u8_t uip_acc32[4]; diff --git a/core/net/uip6.c b/core/net/uip6.c index fdf791ae6..bc731b26c 100644 --- a/core/net/uip6.c +++ b/core/net/uip6.c @@ -41,7 +41,7 @@ * * This file is part of the uIP TCP/IP stack. * - * $Id: uip6.c,v 1.9 2010/02/04 11:17:42 adamdunkels Exp $ + * $Id: uip6.c,v 1.10 2010/02/04 21:14:45 adamdunkels Exp $ * */ @@ -200,10 +200,10 @@ struct uip_conn *uip_conn; static u8_t c; #endif -#if UIP_ACTIVE_OPEN +#if UIP_ACTIVE_OPEN || UIP_UDP /* Keeps track of the last port used for a new connection. */ static u16_t lastport; -#endif /* UIP_ACTIVE_OPEN */ +#endif /* UIP_ACTIVE_OPEN || UIP_UDP */ /** @} */ /*---------------------------------------------------------------------------*/