Commit 2827cb2d authored by Pekka Pessi's avatar Pekka Pessi

Fixed argument checking in nta/nta.c.

Checking for invalid arguments in nta_incoming_treply() and
nta_incoming_mreply().

darcs-hash:20051028162846-65a35-c17b29a0eba5a2b19b25cbf9b36a00dabcd20011.gz
parent cf4ec2db
......@@ -4978,7 +4978,7 @@ int nta_incoming_treply(nta_incoming_t *irq,
{
int retval = -1;
if (irq->irq_status < 200 || status < 200 ||
if (irq && irq->irq_status < 200 || status < 200 ||
(irq->irq_method == sip_method_invite && status < 300)) {
ta_list ta;
msg_t *msg = nta_msg_create(irq->irq_agent, 0);
......@@ -5016,6 +5016,11 @@ int nta_incoming_mreply(nta_incoming_t *irq, msg_t *msg)
int status;
if (irq == NULL) {
msg_destroy(msg);
return -1;
}
if (msg == irq->irq_response)
return 0;
......@@ -8706,6 +8711,9 @@ int reliable_check(nta_incoming_t *irq)
return 1;
}
/** Respond reliably.
*
*/
nta_reliable_t *nta_reliable_treply(nta_incoming_t *irq,
nta_prack_f *callback,
nta_reliable_magic_t *rmagic,
......@@ -8743,6 +8751,12 @@ nta_reliable_t *nta_reliable_treply(nta_incoming_t *irq,
return retval;
}
/** Respond reliably with @a msg.
*
* @note
* The stack takes over the ownership of @a msg. (It is destroyed even if
* sending the response fails.)
*/
nta_reliable_t *nta_reliable_mreply(nta_incoming_t *irq,
nta_prack_f *callback,
nta_reliable_magic_t *rmagic,
......
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