255 |
useg->len += queue->len; |
useg->len += queue->len; |
256 |
useg->next = queue->next; |
useg->next = queue->next; |
257 |
|
|
258 |
DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: chaining, new len %u\n", useg->len)); |
DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_enqueue: chaining, new len %u\n", useg->len)); |
259 |
if(seg == queue) { |
if(seg == queue) { |
260 |
seg = NULL; |
seg = NULL; |
261 |
} |
} |
346 |
pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); |
pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); |
347 |
p = pbuf_alloc(PBUF_TRANSPORT, 0, PBUF_RAM); |
p = pbuf_alloc(PBUF_TRANSPORT, 0, PBUF_RAM); |
348 |
if(p == NULL) { |
if(p == NULL) { |
349 |
DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_enqueue: (ACK) could not allocate pbuf\n")); |
DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: (ACK) could not allocate pbuf\n")); |
350 |
return ERR_BUF; |
return ERR_BUF; |
351 |
} |
} |
352 |
DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_enqueue: sending ACK for %lu\n", pcb->rcv_nxt)); |
DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: sending ACK for %lu\n", pcb->rcv_nxt)); |
353 |
if(pbuf_header(p, TCP_HLEN)) { |
if(pbuf_header(p, TCP_HLEN)) { |
354 |
DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_enqueue: (ACK) no room for TCP header in pbuf.\n")); |
DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: (ACK) no room for TCP header in pbuf.\n")); |
355 |
|
|
356 |
#ifdef TCP_STATS |
#ifdef TCP_STATS |
357 |
++stats.tcp.err; |
++stats.tcp.err; |
517 |
} |
} |
518 |
} |
} |
519 |
if(pbuf_header(p, TCP_HLEN)) { |
if(pbuf_header(p, TCP_HLEN)) { |
520 |
DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_send_data: no room for TCP header in pbuf.\n")); |
DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_rst: no room for TCP header in pbuf.\n")); |
521 |
|
|
522 |
#ifdef TCP_STATS |
#ifdef TCP_STATS |
523 |
++stats.tcp.err; |
++stats.tcp.err; |