C-Netz: Increment error counter only when trying to reach the phone
This commit is contained in:
@@ -704,8 +704,6 @@ void transaction_timeout(struct timer *timer)
|
|||||||
case TRANS_WAF:
|
case TRANS_WAF:
|
||||||
PDEBUG_CHAN(DCNETZ, DEBUG_NOTICE, "No response after dialing request 'Wahlaufforderung'\n");
|
PDEBUG_CHAN(DCNETZ, DEBUG_NOTICE, "No response after dialing request 'Wahlaufforderung'\n");
|
||||||
if (trans->try == N) {
|
if (trans->try == N) {
|
||||||
/* no response to dialing is like MA failed */
|
|
||||||
trans->ma_failed = 1;
|
|
||||||
trans_new_state(trans, TRANS_WBN);
|
trans_new_state(trans, TRANS_WBN);
|
||||||
cnetz_release(trans, CNETZ_CAUSE_FUNKTECHNISCH);
|
cnetz_release(trans, CNETZ_CAUSE_FUNKTECHNISCH);
|
||||||
break;
|
break;
|
||||||
@@ -749,7 +747,8 @@ void transaction_timeout(struct timer *timer)
|
|||||||
break;
|
break;
|
||||||
case TRANS_MFT:
|
case TRANS_MFT:
|
||||||
PDEBUG_CHAN(DCNETZ, DEBUG_NOTICE, "No response after keepalive order 'Meldeaufruf'\n");
|
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);
|
destroy_transaction(trans);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -1173,6 +1172,8 @@ call_failed:
|
|||||||
}
|
}
|
||||||
if (trans->try == N) {
|
if (trans->try == N) {
|
||||||
PDEBUG(DCNETZ, DEBUG_INFO, "Maximum retries, removing transaction\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);
|
cnetz_release(trans, CNETZ_CAUSE_FUNKTECHNISCH);
|
||||||
if (trans->callref)
|
if (trans->callref)
|
||||||
call_in_release(trans->callref, CAUSE_TEMPFAIL);
|
call_in_release(trans->callref, CAUSE_TEMPFAIL);
|
||||||
|
@@ -81,7 +81,7 @@ transaction_t *create_transaction(cnetz_t *cnetz, uint32_t state, uint8_t futln_
|
|||||||
void destroy_transaction(transaction_t *trans)
|
void destroy_transaction(transaction_t *trans)
|
||||||
{
|
{
|
||||||
/* update database: now idle */
|
/* 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);
|
unlink_transaction(trans);
|
||||||
|
|
||||||
|
@@ -40,7 +40,7 @@ typedef struct transaction {
|
|||||||
struct timer timer; /* for varous timeouts */
|
struct timer timer; /* for varous timeouts */
|
||||||
int mo_call; /* flags a moile originating call */
|
int mo_call; /* flags a moile originating call */
|
||||||
int mt_call; /* flags a moile terminating 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;
|
} transaction_t;
|
||||||
|
|
||||||
const char *transaction2rufnummer(transaction_t *trans);
|
const char *transaction2rufnummer(transaction_t *trans);
|
||||||
|
Reference in New Issue
Block a user