mirror of
https://github.com/ipxe/ipxe
synced 2025-12-19 19:49:45 +03:00
Add per-file error identifiers
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <errno.h>
|
||||
#include <gpxe/iobuf.h>
|
||||
#include <gpxe/netdevice.h>
|
||||
|
||||
|
||||
@@ -395,7 +395,6 @@ static int tcp_xmit ( struct tcp_connection *tcp, int force_send ) {
|
||||
size_t seq_len;
|
||||
size_t app_win;
|
||||
size_t rcv_win;
|
||||
int rc;
|
||||
|
||||
/* If retransmission timer is already running, do nothing */
|
||||
if ( timer_running ( &tcp->timer ) )
|
||||
@@ -485,25 +484,8 @@ static int tcp_xmit ( struct tcp_connection *tcp, int force_send ) {
|
||||
DBGC ( tcp, "\n" );
|
||||
|
||||
/* Transmit packet */
|
||||
rc = tcpip_tx ( iobuf, &tcp_protocol, &tcp->peer, NULL, &tcphdr->csum );
|
||||
|
||||
/* If we got -ENETUNREACH, kill the connection immediately
|
||||
* because there is no point retrying. This isn't strictly
|
||||
* necessary (since we will eventually time out anyway), but
|
||||
* it avoids irritating needless delays. Don't do this for
|
||||
* RST packets transmitted on connection abort, to avoid a
|
||||
* potential infinite loop.
|
||||
*/
|
||||
if ( ( ! ( tcp->tcp_state & TCP_STATE_SENT ( TCP_RST ) ) ) &&
|
||||
( rc == -ENETUNREACH ) ) {
|
||||
DBGC ( tcp, "TCP %p aborting after TX failed: %s\n",
|
||||
tcp, strerror ( rc ) );
|
||||
tcp->tcp_state = TCP_CLOSED;
|
||||
tcp_dump_state ( tcp );
|
||||
tcp_close ( tcp, rc );
|
||||
}
|
||||
|
||||
return rc;
|
||||
return tcpip_tx ( iobuf, &tcp_protocol, &tcp->peer, NULL,
|
||||
&tcphdr->csum );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user