forked from Imagelibrary/lwip
minor/coding style: removed spaces before line ending
This commit is contained in:
@@ -213,7 +213,7 @@ tcp_create_segment(struct tcp_pcb *pcb, struct pbuf *p, u8_t flags, u32_t seqno,
|
||||
/* wnd and chksum are set in tcp_output */
|
||||
seg->tcphdr->urgp = 0;
|
||||
return seg;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Allocate a PBUF_RAM pbuf, perhaps with extra space at the end.
|
||||
@@ -228,7 +228,6 @@ tcp_create_segment(struct tcp_pcb *pcb, struct pbuf *p, u8_t flags, u32_t seqno,
|
||||
* @param pcb The TCP connection that willo enqueue the pbuf.
|
||||
* @param apiflags API flags given to tcp_write.
|
||||
* @param first_seg true when this pbuf will be used in the first enqueued segment.
|
||||
* @param
|
||||
*/
|
||||
#if TCP_OVERSIZE
|
||||
static struct pbuf *
|
||||
@@ -396,7 +395,7 @@ tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags)
|
||||
|
||||
LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_write(pcb=%p, data=%p, len=%"U16_F", apiflags=%"U16_F")\n",
|
||||
(void *)pcb, arg, len, (u16_t)apiflags));
|
||||
LWIP_ERROR("tcp_write: arg == NULL (programmer violates API)",
|
||||
LWIP_ERROR("tcp_write: arg == NULL (programmer violates API)",
|
||||
arg != NULL, return ERR_ARG;);
|
||||
|
||||
err = tcp_write_checks(pcb, len);
|
||||
@@ -919,7 +918,7 @@ tcp_send_empty_ack(struct tcp_pcb *pcb)
|
||||
#if LWIP_TCP_TIMESTAMPS || CHECKSUM_GEN_TCP
|
||||
tcphdr = (struct tcp_hdr *)p->payload;
|
||||
#endif /* LWIP_TCP_TIMESTAMPS || CHECKSUM_GEN_TCP */
|
||||
LWIP_DEBUGF(TCP_OUTPUT_DEBUG,
|
||||
LWIP_DEBUGF(TCP_OUTPUT_DEBUG,
|
||||
("tcp_output: sending ACK for %"U32_F"\n", pcb->rcv_nxt));
|
||||
|
||||
/* NB. MSS and window scale options are only sent on SYNs, so ignore them here */
|
||||
@@ -1023,7 +1022,7 @@ tcp_output(struct tcp_pcb *pcb)
|
||||
", seg == NULL, ack %"U32_F"\n",
|
||||
pcb->snd_wnd, pcb->cwnd, wnd, pcb->lastack));
|
||||
} else {
|
||||
LWIP_DEBUGF(TCP_CWND_DEBUG,
|
||||
LWIP_DEBUGF(TCP_CWND_DEBUG,
|
||||
("tcp_output: snd_wnd %"TCPWNDSIZE_F", cwnd %"TCPWNDSIZE_F", wnd %"U32_F
|
||||
", effwnd %"U32_F", seq %"U32_F", ack %"U32_F"\n",
|
||||
pcb->snd_wnd, pcb->cwnd, wnd,
|
||||
@@ -1034,7 +1033,7 @@ tcp_output(struct tcp_pcb *pcb)
|
||||
/* data available and window allows it to be sent? */
|
||||
while (seg != NULL &&
|
||||
ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) {
|
||||
LWIP_ASSERT("RST not expected here!",
|
||||
LWIP_ASSERT("RST not expected here!",
|
||||
(TCPH_FLAGS(seg->tcphdr) & TCP_RST) == 0);
|
||||
/* Stop sending if the nagle algorithm would prevent it
|
||||
* Don't stop:
|
||||
@@ -1183,8 +1182,8 @@ tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb)
|
||||
opts += 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Set retransmission timer running if it is not currently enabled
|
||||
|
||||
/* Set retransmission timer running if it is not currently enabled
|
||||
This must be set before checking the route. */
|
||||
if (pcb->rtime == -1) {
|
||||
pcb->rtime = 0;
|
||||
@@ -1431,12 +1430,12 @@ tcp_rexmit(struct tcp_pcb *pcb)
|
||||
*
|
||||
* @param pcb the tcp_pcb for which to retransmit the first unacked segment
|
||||
*/
|
||||
void
|
||||
void
|
||||
tcp_rexmit_fast(struct tcp_pcb *pcb)
|
||||
{
|
||||
if (pcb->unacked != NULL && !(pcb->flags & TF_INFR)) {
|
||||
/* This is fast retransmit. Retransmit the first unacked segment. */
|
||||
LWIP_DEBUGF(TCP_FR_DEBUG,
|
||||
LWIP_DEBUGF(TCP_FR_DEBUG,
|
||||
("tcp_receive: dupacks %"U16_F" (%"U32_F
|
||||
"), fast retransmit %"U32_F"\n",
|
||||
(u16_t)pcb->dupacks, pcb->lastack,
|
||||
@@ -1450,19 +1449,19 @@ tcp_rexmit_fast(struct tcp_pcb *pcb)
|
||||
} else {
|
||||
pcb->ssthresh = pcb->cwnd / 2;
|
||||
}
|
||||
|
||||
|
||||
/* The minimum value for ssthresh should be 2 MSS */
|
||||
if (pcb->ssthresh < (2U * pcb->mss)) {
|
||||
LWIP_DEBUGF(TCP_FR_DEBUG,
|
||||
LWIP_DEBUGF(TCP_FR_DEBUG,
|
||||
("tcp_receive: The minimum value for ssthresh %"TCPWNDSIZE_F
|
||||
" should be min 2 mss %"U16_F"...\n",
|
||||
pcb->ssthresh, 2*pcb->mss));
|
||||
pcb->ssthresh = 2*pcb->mss;
|
||||
}
|
||||
|
||||
|
||||
pcb->cwnd = pcb->ssthresh + 3 * pcb->mss;
|
||||
pcb->flags |= TF_INFR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1485,9 +1484,9 @@ tcp_keepalive(struct tcp_pcb *pcb)
|
||||
ip_addr_debug_print(TCP_DEBUG, &pcb->remote_ip);
|
||||
LWIP_DEBUGF(TCP_DEBUG, ("\n"));
|
||||
|
||||
LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: tcp_ticks %"U32_F" pcb->tmr %"U32_F" pcb->keep_cnt_sent %"U16_F"\n",
|
||||
LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: tcp_ticks %"U32_F" pcb->tmr %"U32_F" pcb->keep_cnt_sent %"U16_F"\n",
|
||||
tcp_ticks, pcb->tmr, pcb->keep_cnt_sent));
|
||||
|
||||
|
||||
p = tcp_output_alloc_header(pcb, 0, 0, htonl(pcb->snd_nxt - 1));
|
||||
if(p == NULL) {
|
||||
LWIP_DEBUGF(TCP_DEBUG,
|
||||
@@ -1544,9 +1543,9 @@ tcp_zero_window_probe(struct tcp_pcb *pcb)
|
||||
ip_addr_debug_print(TCP_DEBUG, &pcb->remote_ip);
|
||||
LWIP_DEBUGF(TCP_DEBUG, ("\n"));
|
||||
|
||||
LWIP_DEBUGF(TCP_DEBUG,
|
||||
LWIP_DEBUGF(TCP_DEBUG,
|
||||
("tcp_zero_window_probe: tcp_ticks %"U32_F
|
||||
" pcb->tmr %"U32_F" pcb->keep_cnt_sent %"U16_F"\n",
|
||||
" pcb->tmr %"U32_F" pcb->keep_cnt_sent %"U16_F"\n",
|
||||
tcp_ticks, pcb->tmr, pcb->keep_cnt_sent));
|
||||
|
||||
seg = pcb->unacked;
|
||||
|
||||
Reference in New Issue
Block a user