Skip to content

Commit d9a4b50

Browse files
committed
Remove intrusive list from AsyncClient
1 parent a320939 commit d9a4b50

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
@@ -717,7 +717,7 @@ static tcp_pcb *_tcp_listen_with_backlog(tcp_pcb *pcb, uint8_t backlog) {
717717
AsyncClient::AsyncClient(tcp_pcb *pcb)
718718
: _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),
719719
_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),
720-
_rx_timeout(0), _rx_last_ack(0), _ack_timeout(CONFIG_ASYNC_TCP_MAX_ACK_TIME), _connect_port(0), prev(NULL), next(NULL) {
720+
_rx_timeout(0), _rx_last_ack(0), _ack_timeout(CONFIG_ASYNC_TCP_MAX_ACK_TIME), _connect_port(0) {
721721
_pcb = pcb;
722722
_closed_slot = INVALID_CLOSED_SLOT;
723723
if (_pcb) {
@@ -766,21 +766,6 @@ bool AsyncClient::operator==(const AsyncClient &other) const {
766766
return _pcb == other._pcb;
767767
}
768768

769-
AsyncClient &AsyncClient::operator+=(const AsyncClient &other) {
770-
if (next == NULL) {
771-
next = (AsyncClient *)(&other);
772-
next->prev = this;
773-
} else {
774-
AsyncClient *c = next;
775-
while (c->next != NULL) {
776-
c = c->next;
777-
}
778-
c->next = (AsyncClient *)(&other);
779-
c->next->prev = c;
780-
}
781-
return *this;
782-
}
783-
784769
/*
785770
* Callback Setters
786771
* */

src/AsyncTCP.h

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

7878
AsyncClient &operator=(const AsyncClient &other);
79-
AsyncClient &operator+=(const AsyncClient &other);
8079

8180
bool operator==(const AsyncClient &other) const;
8281

@@ -290,10 +289,6 @@ class AsyncClient {
290289
int8_t _fin(tcp_pcb *pcb, int8_t err);
291290
int8_t _lwip_fin(tcp_pcb *pcb, int8_t err);
292291
void _dns_found(struct ip_addr *ipaddr);
293-
294-
public:
295-
AsyncClient *prev;
296-
AsyncClient *next;
297292
};
298293

299294
class AsyncServer {

0 commit comments

Comments
 (0)