C-Netz: Increment error counter only when trying to reach the phone

This commit is contained in:
Andreas Eversberg 2016-10-23 11:50:02 +02:00
parent 1ea95de120
commit c6d3a41b81
3 changed files with 6 additions and 5 deletions

View File

@ -704,8 +704,6 @@ void transaction_timeout(struct timer *timer)
case TRANS_WAF:
PDEBUG_CHAN(DCNETZ, DEBUG_NOTICE, "No response after dialing request 'Wahlaufforderung'\n");
if (trans->try == N) {
/* no response to dialing is like MA failed */
trans->ma_failed = 1;
trans_new_state(trans, TRANS_WBN);
cnetz_release(trans, CNETZ_CAUSE_FUNKTECHNISCH);
break;
@ -749,7 +747,8 @@ void transaction_timeout(struct timer *timer)
break;
case TRANS_MFT:
PDEBUG_CHAN(DCNETZ, DEBUG_NOTICE, "No response after keepalive order 'Meldeaufruf'\n");
trans->ma_failed = 1;
/* no response to availability check */
trans->page_failed = 1;
destroy_transaction(trans);
break;
default:
@ -1173,6 +1172,8 @@ call_failed:
}
if (trans->try == N) {
PDEBUG(DCNETZ, DEBUG_INFO, "Maximum retries, removing transaction\n");
/* no response to incomming call */
trans->page_failed = 1;
cnetz_release(trans, CNETZ_CAUSE_FUNKTECHNISCH);
if (trans->callref)
call_in_release(trans->callref, CAUSE_TEMPFAIL);

View File

@ -81,7 +81,7 @@ transaction_t *create_transaction(cnetz_t *cnetz, uint32_t state, uint8_t futln_
void destroy_transaction(transaction_t *trans)
{
/* update database: now idle */
update_db(trans->cnetz, trans->futln_nat, trans->futln_fuvst, trans->futln_rest, -1, 0, trans->ma_failed);
update_db(trans->cnetz, trans->futln_nat, trans->futln_fuvst, trans->futln_rest, -1, 0, trans->page_failed);
unlink_transaction(trans);

View File

@ -40,7 +40,7 @@ typedef struct transaction {
struct timer timer; /* for varous timeouts */
int mo_call; /* flags a moile originating call */
int mt_call; /* flags a moile terminating call */
int ma_failed; /* failed to get a response from MS */
int page_failed; /* failed to get a response from MS */
} transaction_t;
const char *transaction2rufnummer(transaction_t *trans);