Changeset 4716 for pjproject/trunk


Ignore:
Timestamp:
Jan 24, 2014 11:28:34 AM (11 years ago)
Author:
bennylp
Message:

Fixed #1725: ACK is not sent upon receiving 200/OK retransmission if re-INVITE is sent

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c

    r4715 r4716  
    399399    } 
    400400 
     401    /* Note that with https://trac.pjsip.org/repos/ticket/1725, this 
     402     * function can be called to send ACK for previous INVITE 200/OK 
     403     * retransmission 
     404     */ 
     405 
    401406    PJ_LOG(5,(inv->obj_name, "Received %s, sending ACK", 
    402407              pjsip_rx_data_get_info(rdata))); 
     
    619624     */ 
    620625    if (msg->type == PJSIP_RESPONSE_MSG && msg->line.status.code/100==2 && 
    621         rdata->msg_info.cseq->method.id == PJSIP_INVITE_METHOD && 
    622         inv->invite_tsx == NULL)  
    623     { 
    624         pjsip_event e; 
    625  
    626         PJSIP_EVENT_INIT_RX_MSG(e, rdata); 
    627         inv_send_ack(inv, &e); 
    628         return PJ_TRUE; 
    629  
     626        rdata->msg_info.cseq->method.id == PJSIP_INVITE_METHOD) 
     627    { 
     628        /* The code inside "if" is called the second time 200/OK 
     629         * retransmission is received. Also handle the situation 
     630         * when we have another re-INVITE on going and 200/OK 
     631         * retransmission is received. See: 
     632         * https://trac.pjsip.org/repos/ticket/1725 
     633         */ 
     634        if (inv->invite_tsx == NULL || 
     635            (inv->last_ack && inv->last_ack_cseq==rdata->msg_info.cseq->cseq)) 
     636        { 
     637            pjsip_event e; 
     638 
     639            PJSIP_EVENT_INIT_RX_MSG(e, rdata); 
     640            inv_send_ack(inv, &e); 
     641            return PJ_TRUE; 
     642        } 
    630643    } 
    631644 
Note: See TracChangeset for help on using the changeset viewer.