Ignore:
Timestamp:
Apr 11, 2007 6:32:30 PM (18 years ago)
Author:
bennylp
Message:

Fixed ticket #221: Bug in retransmission of non-INVITE SIP requests in UAC transaction (thanks Martin Peterzon)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsip/sip_transaction.h

    r974 r1190  
    7575 
    7676/** 
    77  * Transaction timeout timer policy, to control the UAC transaction timeout 
    78  * scheduling (see #pjsip_tsx_set_uac_timeout()). 
    79  */ 
    80 typedef enum pjsip_tsx_timeout_policy 
    81 { 
    82     PJSIP_TSX_IGNORE_100 = 1,   /**< To make the UAC transaction NOT to cancel 
    83                                      the timeout timer when 100 response is  
    84                                      received.*/ 
    85     PJSIP_TSX_IGNORE_1xx = 3    /**< To make the UAC transaction NOT to cancel 
    86                                      the timeout timer when any 1xx responses  
    87                                      are received. */ 
    88 } pjsip_tsx_timeout_policy; 
    89  
    90  
    91 /** 
    9277 * This structure describes SIP transaction object. The transaction object 
    9378 * is used to handle both UAS and UAC transaction. 
     
    146131    pj_timer_entry              timeout_timer;  /**< Timeout timer.         */ 
    147132 
    148     unsigned                    msec_timeout;   /**< User set timeout.      */ 
    149     pjsip_tsx_timeout_policy    timeout_policy; /**< Timeout policy.        */ 
    150  
    151133    /** Module specific data. */ 
    152134    void                       *mod_data[PJSIP_MAX_MODULE]; 
     
    249231                                             const pjsip_tpselector *sel); 
    250232 
    251  
    252 /** 
    253  * Set the UAC absolute transaction timeout. Normally UAC transaction will 
    254  * stop its timeout timer (timer B for INVITE and timer F for non-INVITE 
    255  * transactions) after a provisional response is received. 
    256  * 
    257  * When this timer is set, the transaction's timer B and F will use this 
    258  * value, and if the \a flag flag is set, the transaction will continue 
    259  * the scheduling of the timeout timer even when provisional response has 
    260  * been received. 
    261  * 
    262  * Note that this function MUST be called AFTER the transaction has been 
    263  * created AND BEFORE any request is transmitted. 
    264  * 
    265  * @param tsx       The client/UAC transaction. 
    266  * @param msec_time The timeout value, in miliseconds. Currently this 
    267  *                  value must be non-zero (value zero is reserved for 
    268  *                  future use). 
    269  * @param flag      Option flags to control whether the transaction should 
    270  *                  cancel the timeout timer on arrival of provisional 
    271  *                  responses (which is yes according to RFC 3261). 
    272  *                  The valid values are: 
    273  *                  - PJSIP_TSX_IGNORE_100, to make the UAC transaction 
    274  *                    NOT to cancel the timeout timer when 100 response 
    275  *                    is received. 
    276  *                  - PJSIP_TSX_IGNORE_1xx, to make the UAC transaction 
    277  *                    NOT to cancel the timeout timer when any 1xx  
    278  *                    responses are received. 
    279  * 
    280  *                  Note that regardless of the values in the \a flag  
    281  *                  argument, the provisional response would still be 
    282  *                  delivered to transaction user and it will still 
    283  *                  affect the transaction state. The \a flag flag only 
    284  *                  changes the behavior of the timeout timer of the 
    285  *                  transaction. 
    286  */ 
    287 PJ_DECL(pj_status_t) pjsip_tsx_set_uac_timeout(pjsip_transaction *tsx, 
    288                                                unsigned msec_time, 
    289                                                pjsip_tsx_timeout_policy flag); 
    290  
    291  
    292233/** 
    293234 * Call this function to manually feed a message to the transaction. 
Note: See TracChangeset for help on using the changeset viewer.