|
|
|
@ -248,6 +248,7 @@ void etcp_connection_close(struct ETCP_CONN* etcp) { |
|
|
|
void etcp_conn_reset(struct ETCP_CONN* etcp) { |
|
|
|
void etcp_conn_reset(struct ETCP_CONN* etcp) { |
|
|
|
DEBUG_TRACE(DEBUG_CATEGORY_ETCP, ""); |
|
|
|
DEBUG_TRACE(DEBUG_CATEGORY_ETCP, ""); |
|
|
|
// Reset IDs
|
|
|
|
// Reset IDs
|
|
|
|
|
|
|
|
DEBUG_INFO(DEBUG_CATEGORY_ETCP, "Resetting ETCP instance [%d]", etcp->log_name); |
|
|
|
etcp->next_tx_id = 1; |
|
|
|
etcp->next_tx_id = 1; |
|
|
|
etcp->last_rx_id = 0; |
|
|
|
etcp->last_rx_id = 0; |
|
|
|
etcp->last_delivered_id = 0; |
|
|
|
etcp->last_delivered_id = 0; |
|
|
|
@ -275,6 +276,12 @@ void etcp_conn_reset(struct ETCP_CONN* etcp) { |
|
|
|
// Reset timers (just clear the pointers - timers will expire naturally)
|
|
|
|
// Reset timers (just clear the pointers - timers will expire naturally)
|
|
|
|
etcp->retrans_timer = NULL; |
|
|
|
etcp->retrans_timer = NULL; |
|
|
|
etcp->ack_resp_timer = NULL; |
|
|
|
etcp->ack_resp_timer = NULL; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Reset normalizer (packer/unpacker state for reconnection)
|
|
|
|
|
|
|
|
if (etcp->normalizer) { |
|
|
|
|
|
|
|
pn_reset(etcp->normalizer); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
DEBUG_TRACE(DEBUG_CATEGORY_ETCP, "end"); |
|
|
|
DEBUG_TRACE(DEBUG_CATEGORY_ETCP, "end"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|