Changes between Initial Version and Version 2 of Ticket #2209


Ignore:
Timestamp:
Jul 1, 2019 7:44:35 AM (5 years ago)
Author:
ming
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2209

    • Property Owner set to ming
    • Property Status changed from new to closed
    • Property Resolution changed from to fixed
  • Ticket #2209 – Description

    initial v2  
    11[https://tools.ietf.org/html/rfc3261#section-20.19 RFC 3261 20.19] specifies the Expires header field to be between 0 and 2^32^-1 seconds, but currently in sip_msg, we use the value of (signed) int. This is also applicable for Min-Expires header field, and Expires parameter of Contact header. 
    22 
     3The following struct fields and APIs will change (all changes are from signed 32-bit integer to unsigned): 
     4* pjsua2: 
     5 - !AccountInfo.regExpiresSec 
     6 - !OnRegStateParam.expiration 
     7 
     8* pjsua: 
     9 - pjsua_acc_info.expires 
     10 
     11* pjsip: 
     12 - pjsip_contact_hdr.expires 
     13 - pjsip_generic_int_hdr.ivalue/ pjsip_expires_hdr.ivalue/ pjsip_min_expires_hdr.ivalue/ pjsip_max_fwd_hdr.ivalue 
     14 - pjsip_regc_info.interval 
     15 - pjsip_regc_info.next_reg 
     16 - pjsip_regc_cbparam.expiration 
     17 - pjsip_generic_int_hdr_create()/ pjsip_generic_int_hdr_init()/pjsip_expires_hdr_create()/ pjsip_expires_hdr_init()/ pjsip_min_expires_hdr_create()/ pjsip_min_expires_hdr_init()/ pjsip_max_fwd_hdr_create()/ pjsip_max_fwd_hdr_init() 
     18 
     19* pjsip-simple: 
     20 - pjsip_sub_state_hdr.expires_param 
     21 - pjsip_publishc_cbparam.expiration 
     22 - pjsip_pres_initiate() 
     23 - pjsip_mwi_initiate() 
     24 - pjsip_evsub_initiate() 
     25 
     26**IMPORTANT! 
     27Backward compatibility issue: 
     28 - Any sign comparison of the above expiration fields MUST be modified, for example: expires < 0 should be changed to expires == PJSIP_EXPIRES_NOT_SPECIFIED. 
     29 - Direct setting/comparison with -1 should still work, for example: pjsip_pres_inititate(sub, -1, ...) or expires == -1. This is because PJSIP_EXPIRES_NOT_SPECIFIED == (unsigned) -1. Nevertheless, for future compatibility, it is recommended to change any -1 to PJSIP_EXPIRES_NOT_SPECIFIED. 
     30