Skip to content

Commit b9c100e

Browse files
committed
Remove intrusive list from AsyncClient
1 parent 790d218 commit b9c100e

File tree

2 files changed

+1
-21
lines changed

2 files changed

+1
-21
lines changed

src/AsyncTCP.cpp

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ static tcp_pcb *_tcp_listen_with_backlog(tcp_pcb *pcb, uint8_t backlog) {
732732
AsyncClient::AsyncClient(tcp_pcb *pcb)
733733
: _connect_cb(0), _connect_cb_arg(0), _discard_cb(0), _discard_cb_arg(0), _sent_cb(0), _sent_cb_arg(0), _error_cb(0), _error_cb_arg(0), _recv_cb(0),
734734
_recv_cb_arg(0), _pb_cb(0), _pb_cb_arg(0), _timeout_cb(0), _timeout_cb_arg(0), _poll_cb(0), _poll_cb_arg(0), _ack_pcb(true), _tx_last_packet(0),
735-
_rx_timeout(0), _rx_last_ack(0), _ack_timeout(CONFIG_ASYNC_TCP_MAX_ACK_TIME), _connect_port(0), prev(NULL), next(NULL) {
735+
_rx_timeout(0), _rx_last_ack(0), _ack_timeout(CONFIG_ASYNC_TCP_MAX_ACK_TIME), _connect_port(0) {
736736
_pcb = pcb;
737737
_closed_slot = INVALID_CLOSED_SLOT;
738738
if (_pcb) {
@@ -781,21 +781,6 @@ bool AsyncClient::operator==(const AsyncClient &other) const {
781781
return _pcb == other._pcb;
782782
}
783783

784-
AsyncClient &AsyncClient::operator+=(const AsyncClient &other) {
785-
if (next == NULL) {
786-
next = (AsyncClient *)(&other);
787-
next->prev = this;
788-
} else {
789-
AsyncClient *c = next;
790-
while (c->next != NULL) {
791-
c = c->next;
792-
}
793-
c->next = (AsyncClient *)(&other);
794-
c->next->prev = c;
795-
}
796-
return *this;
797-
}
798-
799784
/*
800785
* Callback Setters
801786
* */

src/AsyncTCP.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ class AsyncClient {
8181
~AsyncClient();
8282

8383
AsyncClient &operator=(const AsyncClient &other);
84-
AsyncClient &operator+=(const AsyncClient &other);
8584

8685
bool operator==(const AsyncClient &other) const;
8786

@@ -308,10 +307,6 @@ class AsyncClient {
308307
int8_t _fin(tcp_pcb *pcb, int8_t err);
309308
int8_t _lwip_fin(tcp_pcb *pcb, int8_t err);
310309
void _dns_found(struct ip_addr *ipaddr);
311-
312-
public:
313-
AsyncClient *prev;
314-
AsyncClient *next;
315310
};
316311

317312
class AsyncServer {

0 commit comments

Comments
 (0)