add checks to find issue in FSCORE-338

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13308 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2009-05-14 18:30:50 +00:00
parent 52630045aa
commit 7585c4fafc
1 changed files with 17 additions and 8 deletions

View File

@ -1048,11 +1048,14 @@ void nta_agent_destroy(nta_agent_t *agent)
nta_outgoing_t *orq = oht->oht_table[i];
if (!orq->orq_destroyed)
SU_DEBUG_3(("%s: destroying %s client transaction to <"
SU_DEBUG_3(("%s: destroying %s%s client transaction to <"
URL_PRINT_FORMAT ">\n",
__func__, orq->orq_method_name,
__func__,
(orq->orq_forking || orq->orq_forks) ? "forked " : "forking",
orq->orq_method_name,
URL_PRINT_ARGS(orq->orq_to->a_url)));
orq->orq_forks = NULL, orq->orq_forking = NULL;
outgoing_free(orq);
}
@ -8493,6 +8496,7 @@ static
void outgoing_free(nta_outgoing_t *orq)
{
SU_DEBUG_9(("nta: outgoing_free(%p)\n", (void *)orq));
assert(orq->orq_forks == NULL && orq->orq_forking == NULL);
outgoing_cut_off(orq);
outgoing_reclaim(orq);
}
@ -8585,7 +8589,10 @@ int outgoing_default_cb(nta_outgoing_magic_t *magic,
void outgoing_destroy(nta_outgoing_t *orq)
{
if (orq->orq_terminated || orq->orq_default) {
outgoing_free(orq);
if (!orq->orq_forking && !orq->orq_forks) {
outgoing_free(orq);
return;
}
}
/* Application is expected to handle 200 OK statelessly
=> kill transaction immediately */
@ -8596,12 +8603,12 @@ void outgoing_destroy(nta_outgoing_t *orq)
&& !orq->orq_forking && !orq->orq_forks) {
orq->orq_destroyed = 1;
outgoing_terminate(orq);
return;
}
else {
orq->orq_destroyed = 1;
orq->orq_callback = outgoing_default_cb;
orq->orq_magic = NULL;
}
orq->orq_destroyed = 1;
orq->orq_callback = outgoing_default_cb;
orq->orq_magic = NULL;
}
/** @internal Outgoing transaction timer routine.
@ -8882,6 +8889,8 @@ outgoing_terminate_invite(nta_outgoing_t *original)
"terminate", orq->orq_method_name, orq->orq_cseq->cs_seq,
orq->orq_tag));
orq->orq_forking = NULL;
if (outgoing_terminate(orq))
continue;