Changeset 219


Ignore:
Timestamp:
Feb 22, 2006 10:18:58 PM (18 years ago)
Author:
bennylp
Message:

Fixed bug in registration (CSeq not incremented after 401)

File:
1 edited

Legend:

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

    r201 r219  
    3131#include <pj/pool.h> 
    3232#include <pj/log.h> 
     33#include <pj/rand.h> 
    3334#include <pj/string.h> 
    3435 
     
    267268    /* Set "CSeq" header. */ 
    268269    regc->cseq_hdr = pjsip_cseq_hdr_create(regc->pool); 
    269     regc->cseq_hdr->cseq = 0; 
     270    regc->cseq_hdr->cseq = pj_rand() % 0xFFFF; 
    270271    pjsip_method_set( &regc->cseq_hdr->method, PJSIP_REGISTER_METHOD); 
    271272 
     
    592593{ 
    593594    pj_status_t status; 
     595    pjsip_cseq_hdr *cseq_hdr; 
     596    pj_uint32_t cseq; 
    594597 
    595598    /* Make sure we don't have pending transaction. */ 
     
    603606 
    604607    /* Increment CSeq */ 
    605     regc->cseq_hdr->cseq++; 
     608    cseq = ++regc->cseq_hdr->cseq; 
     609    cseq_hdr = pjsip_msg_find_hdr(tdata->msg, PJSIP_H_CSEQ, NULL); 
     610    cseq_hdr->cseq = cseq; 
    606611 
    607612    /* Send. */ 
Note: See TracChangeset for help on using the changeset viewer.