Commit 40fcee44 authored by Pekka Pessi's avatar Pekka Pessi

nua: removed asserts() on hairy dialog/request handling cases

darcs-hash:20080121180049-65a35-b7a64e004b5da9481f7f29bf92798d04fbd473d7.gz
parent 0641dba4
......@@ -1089,9 +1089,16 @@ int nua_invite_client_ack(nua_client_request_t *cr, tagi_t const *tags)
char const *phrase = "OK", *reason = NULL;
char const *invite_branch;
assert(ds->ds_leg);
assert(cr->cr_orq);
if (!ds->ds_leg) {
/* XXX - fix nua_dialog_usage_remove_at() instead! */
nta_outgoing_destroy(cr->cr_orq);
return -1;
}
assert(ds->ds_leg);
msg = nta_outgoing_getrequest(cr->cr_orq);
sip = sip_object(msg);
if (!msg)
......
......@@ -2125,7 +2125,9 @@ int nua_client_bind(nua_client_request_t *cr, nua_dialog_usage_t *du)
}
if (du->du_cr && cr != du->du_cr) {
assert(!nua_client_is_queued(du->du_cr));
/* This should never happen (but it does):
assert(!nua_client_is_queued(du->du_cr));
*/
if (nua_client_is_queued(du->du_cr))
return -1;
if (nua_client_is_reporting(du->du_cr)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment