Browse Source

1

nodeinfo-routing-update
Evgeny 2 weeks ago
parent
commit
71e602825a
  1. 5
      src/etcp.c

5
src/etcp.c

@ -628,16 +628,15 @@ static void send_ack_req_cb(struct ll_queue* q, void* arg) {// etcp->ack_q data
void etcp_on_link_down(struct ETCP_CONN* etcp) { void etcp_on_link_down(struct ETCP_CONN* etcp) {
DEBUG_TRACE(DEBUG_CATEGORY_ETCP, ""); DEBUG_TRACE(DEBUG_CATEGORY_ETCP, "");
// scan all links ->
int up=0; int up=0;
struct ETCP_LINK* link = etcp->links; struct ETCP_LINK* link = etcp->links;
while (link) { while (link) {
if (link->link_status) up=1; if (link->link_status) up=1;
link = link->next; link = link->next;
} }
int was_up = etcp->links_up;
etcp->links_up = up; etcp->links_up = up;
if (up==0 && etcp->links_up!=0) { if (up == 0 && was_up != 0) {
etcp->links_up=0;
etcp_on_down(etcp); etcp_on_down(etcp);
} }
} }

Loading…
Cancel
Save