Merge changes from sofia-sip tree:

Mon Feb 12 21:22:39 EET 2007  Maxim Zaikin <Maxim at amsd.com>
  * su_pthread_port.c: destroying condition variable used when destroying the thread.

Tue Feb 13 01:10:38 EET 2007  kai.vehmanen@nokia.com
  * nua: Ignore CANCEL of incoming request if we have already sent a final response, part 2.

Tue Feb 13 01:02:00 EET 2007  kai.vehmanen@nokia.com
  * nua: Ignore CANCEL of incoming request if we have already sent a final response. Problem reported by Mike Jerris.

nua: fixed problems in state machines.
Pekka Pessi <first.lastname@nokia.com>**20070214201847
   
 These problems are mostly introduced in 1.12.5:
 - assert failed if INVITE was received when calling
   (reported by Michael Jerris)
 - assert failed if nua_invite() was called second time before receiving
   final response to first INVITE (ditto)
 - ACK is now always sent if session was terminated after receiving 2XX
 - if nua has a pending incoming INVITE request, return 491 to
   nua_invite()

nta.c: return 481 response to CANCEL if INVITE transaction was successful
According to the RFC 3261 state diagram the INVITE transaction is destroyed
 immediately when a final 2XX series response is sent. Now nta returns a 481
 response to CANCEL if it finds an INVITE server transaction that was
 responded with a 2XX success response.




git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4284 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris committed 2007-02-15 05:18:37 +00:00
1 parent 6e12fb32cd
commit 85c8bcd5ed
17 files changed
+1053 -289

No files matched your search

+21 -7
View File
@@ -5056,10 +5056,16 @@ nta_incoming_t *incoming_find(nta_agent_t const *agent,
if (irq->irq_method == rq->rq_method)
break; /* found */
if (return_ack && rq->rq_method == sip_method_cancel)
*return_ack = irq;
else if (return_ack && rq->rq_method == sip_method_ack &&
irq->irq_method == sip_method_invite)
if (!return_ack)
continue;
if (irq->irq_method == sip_method_invite) {
if (rq->rq_method == sip_method_cancel)
*return_ack = irq;
else if (rq->rq_method == sip_method_ack)
*return_ack = irq;
}
else if (rq->rq_method == sip_method_cancel && !irq->irq_terminated)
*return_ack = irq;
}
@@ -5179,10 +5185,18 @@ int incoming_cancel(nta_incoming_t *irq, msg_t *msg, sip_t *sip,
nta_agent_t *agent = irq->irq_agent;
/* Respond to the CANCEL */
nta_msg_treply(agent, msg_ref_create(msg), SIP_200_OK,
NTATAG_TPORT(tport),
TAG_END());
if (200 <= irq->irq_status && irq->irq_status < 300) {
nta_msg_treply(agent, msg_ref_create(msg), SIP_481_NO_TRANSACTION,
NTATAG_TPORT(tport),
TAG_END());
}
else
nta_msg_treply(agent, msg_ref_create(msg), SIP_200_OK,
NTATAG_TPORT(tport),
TAG_END());
/* We have already sent final response */
if (irq->irq_completed || irq->irq_method != sip_method_invite) {
msg_destroy(msg);
return 0;