From 12c50ed87b236dd204ce3a7132bd929bfde38e5b Mon Sep 17 00:00:00 2001 From: goldsimon Date: Sun, 19 Apr 2009 12:17:59 +0000 Subject: [PATCH] tcp_listen_input: format code for #if LWIP_TCP_TIMESTAMPS that calls tcp_enqueue like the other calls. --- src/core/tcp_in.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/core/tcp_in.c b/src/core/tcp_in.c index b88bccee..c493f53d 100644 --- a/src/core/tcp_in.c +++ b/src/core/tcp_in.c @@ -453,13 +453,12 @@ tcp_listen_input(struct tcp_pcb_listen *pcb) snmp_inc_tcppassiveopens(); /* Send a SYN|ACK together with the MSS option. */ + rc = tcp_enqueue(npcb, NULL, 0, TCP_SYN | TCP_ACK, 0, TF_SEG_OPTS_MSS #if LWIP_TCP_TIMESTAMPS - if (npcb->flags & TF_TIMESTAMP) - rc = tcp_enqueue(npcb, NULL, 0, TCP_SYN | TCP_ACK, 0, - TF_SEG_OPTS_MSS | TF_SEG_OPTS_TS); - else + /* and maybe include the TIMESTAMP option */ + | (npcb->flags & TF_TIMESTAMP ? TF_SEG_OPTS_TS : 0) #endif - rc = tcp_enqueue(npcb, NULL, 0, TCP_SYN | TCP_ACK, 0, TF_SEG_OPTS_MSS); + ); if (rc != ERR_OK) { tcp_abandon(npcb, 0); return rc;