Improved the WTP application to exit

This commit is contained in:
vemax78
2013-06-05 19:39:03 +02:00
parent 4d2292b7f0
commit 49bf2dc5c9
5 changed files with 30 additions and 19 deletions

View File

@ -90,9 +90,13 @@ int wtp_dfa_state_dtlsteardown(struct capwap_parsed_packet* packet, struct timeo
/* */
wtp_free_reference_last_request();
wtp_free_reference_last_response();
wtp_free_packet_rxmng(0);
wtp_free_packet_rxmng(1);
/* */
if ((g_wtp.dfa.rfcFailedDTLSSessionCount >= g_wtp.dfa.rfcMaxFailedDTLSSessionRetry) || (g_wtp.dfa.rfcFailedDTLSAuthFailCount >= g_wtp.dfa.rfcMaxFailedDTLSSessionRetry)) {
/* */
if (!g_wtp.running) {
return WTP_DFA_EXIT;
} else if ((g_wtp.dfa.rfcFailedDTLSSessionCount >= g_wtp.dfa.rfcMaxFailedDTLSSessionRetry) || (g_wtp.dfa.rfcFailedDTLSAuthFailCount >= g_wtp.dfa.rfcMaxFailedDTLSSessionRetry)) {
wtp_dfa_change_state(CAPWAP_DTLS_TEARDOWN_TO_SULKING_STATE);
} else {
wtp_dfa_change_state(CAPWAP_DTLS_TEARDOWN_TO_IDLE_STATE);