Changeset 5024 for pjproject


Ignore:
Timestamp:
Mar 26, 2015 2:51:19 AM (9 years ago)
Author:
nanang
Message:

Re #1828:

  • Fixed failing regc test in pjsip-test due to modification in #1819.
  • Fixed assertion in destruction of SIP transport loop.
Location:
pjproject/trunk/pjsip/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip/sip_transport_loop.c

    r4713 r5024  
    223223    loop->thread_quit_flag = 1; 
    224224    /* Unlock transport mutex before joining thread. */ 
    225     pj_lock_release(tp->lock); 
     225    /// This raised assertion failed "mutex->owner == pj_thread_this()", 
     226    /// where mutex->owner==NULL 
     227    //pj_lock_release(tp->lock); 
    226228    pj_thread_join(loop->thread); 
    227229    pj_thread_destroy(loop->thread); 
  • pjproject/trunk/pjsip/src/test/regc_test.c

    r4712 r5024  
    371371        return -260; 
    372372    } 
    373     if (client_result.interval != client_result.expiration) { 
     373    if (client_result.have_reg && client_result.interval != client_result.expiration) { 
    374374        PJ_LOG(3,(THIS_FILE, "    error: interval (%d) is different than expiration (%d)", 
    375375                  client_result.interval, client_result.expiration)); 
    376376        return -270; 
    377377    } 
    378     if (client_result.expiration > 0 && client_result.next_reg < 1) { 
    379         PJ_LOG(3,(THIS_FILE, "    error: next_reg=%d, expecting positive number because expiration is %d", 
    380                   client_result.next_reg, client_result.expiration)); 
     378    if (client_result.interval > 0 && client_result.next_reg < 1) { 
     379        PJ_LOG(3,(THIS_FILE, "    error: next_reg=%d, expecting positive number because interval is %d", 
     380                  client_result.next_reg, client_result.interval)); 
    381381        return -280; 
    382382    } 
     
    403403    struct client client_cfg =  
    404404        /* error        code    have_reg    expiration  contact_cnt auth?    destroy*/ 
    405         { PJ_FALSE,     200,    PJ_TRUE,   TIMEOUT,     1,          PJ_FALSE,PJ_FALSE}; 
     405        { PJ_FALSE,     200,    PJ_TRUE,    TIMEOUT,    1,          PJ_FALSE,PJ_FALSE}; 
    406406    pj_str_t contact = pj_str("<sip:c@C>"); 
    407407 
     
    480480    struct client client_cfg =  
    481481        /* error        code    have_reg    expiration  contact_cnt auth?    destroy*/ 
    482         { PJ_FALSE,     200,    PJ_TRUE,   TIMEOUT,     1,          PJ_FALSE,PJ_FALSE}; 
     482        { PJ_FALSE,     200,    PJ_TRUE,    TIMEOUT,    1,          PJ_FALSE,PJ_FALSE}; 
    483483    pj_str_t contact = pj_str("<sip:c@C>"); 
    484484 
     
    537537    struct client client_cfg =  
    538538        /* error        code    have_reg    expiration  contact_cnt auth?    destroy*/ 
    539         { PJ_FALSE,     200,    PJ_TRUE,   TIMEOUT,     1,          PJ_FALSE,PJ_FALSE}; 
     539        { PJ_FALSE,     200,    PJ_TRUE,    TIMEOUT,    1,          PJ_FALSE,PJ_FALSE}; 
    540540    pj_str_t contacts[] = { 
    541541        { "<sip:a>", 7 }, 
     
    710710    struct registrar_cfg server_cfg =  
    711711        /* respond      code    auth      contact  exp_prm expires more_contacts */ 
    712         { PJ_TRUE,      200,    PJ_TRUE,  EXACT,   75,      0,      {NULL, 0}}; 
     712        { PJ_TRUE,      200,    PJ_TRUE,  EXACT,   75,     0,       {NULL, 0}}; 
    713713    struct client client_cfg =  
    714714        /* error        code    have_reg    expiration  contact_cnt auth?    destroy*/ 
    715         { PJ_TRUE,      401,    PJ_FALSE, -1,           0,          PJ_TRUE, PJ_TRUE}; 
     715        { PJ_TRUE,      401,    PJ_FALSE,   TIMEOUT,    0,          PJ_TRUE, PJ_TRUE}; 
    716716    pj_str_t contact = pj_str("<sip:c@C>"); 
    717717 
     
    775775            /* client expected results: */ 
    776776            /* error    code    have_reg    expiration  contact_cnt auth?*/ 
    777             { PJ_FALSE, 502,    PJ_FALSE,   -1,         0,          PJ_FALSE} 
     777            { PJ_FALSE, 502,    PJ_FALSE,   600,        0,          PJ_FALSE} 
    778778        }, 
    779779 
     
    794794            /* client expected results: */ 
    795795            /* error    code    have_reg    expiration  contact_cnt auth? */ 
    796             { PJ_FALSE, 408,    PJ_FALSE,   -1,         0,          PJ_FALSE} 
     796            { PJ_FALSE, 408,    PJ_FALSE,   600,        0,          PJ_FALSE} 
    797797        }, 
    798798 
     
    817817            /* client expected results: */ 
    818818            /* error    code    have_reg    expiration  contact_cnt auth?*/ 
    819             { PJ_FALSE, 200,    PJ_TRUE,   75,          1,          PJ_FALSE} 
     819            { PJ_FALSE, 200,    PJ_TRUE,    75,         1,          PJ_FALSE} 
    820820        }, 
    821821 
     
    837837            /* client expected results: */ 
    838838            /* error    code    have_reg    expiration  contact_cnt auth?*/ 
    839             { PJ_FALSE, 200,    PJ_TRUE,   75,          1,          PJ_TRUE} 
     839            { PJ_FALSE, 200,    PJ_TRUE,    75,         1,          PJ_TRUE} 
    840840        }, 
    841841 
     
    855855            /* registrar config: */ 
    856856            /* respond  code    auth      contact  exp_prm expires more_contacts */ 
    857             { PJ_TRUE,  200,    PJ_FALSE, EXACT,    75,     65,     {"<sip:a@a>;expires=70", 0}}, 
     857            { PJ_TRUE,  200,    PJ_FALSE, EXACT,   75,      65,     {"<sip:a@a>;expires=70", 0}}, 
    858858 
    859859            /* client expected results: */ 
    860860            /* error    code    have_reg    expiration  contact_cnt auth?*/ 
    861             { PJ_FALSE, 200,    PJ_TRUE,   75,          2,          PJ_FALSE} 
     861            { PJ_FALSE, 200,    PJ_TRUE,    75,         2,          PJ_FALSE} 
    862862        }, 
    863863 
     
    884884            /* client expected results: */ 
    885885            /* error    code    have_reg    expiration  contact_cnt auth?*/ 
    886             { PJ_FALSE, 200,    PJ_TRUE,   75,          1,          PJ_FALSE} 
     886            { PJ_FALSE, 200,    PJ_TRUE,    75,         1,          PJ_FALSE} 
    887887        }, 
    888888 
     
    910910            /* client expected results: */ 
    911911            /* error    code    have_reg    expiration  contact_cnt auth?*/ 
    912             { PJ_FALSE, 200,    PJ_TRUE,   75,          2,          PJ_FALSE} 
     912            { PJ_FALSE, 200,    PJ_TRUE,    75,         2,          PJ_FALSE} 
    913913        }, 
    914914 
     
    934934            /* client expected results: */ 
    935935            /* error    code    have_reg    expiration  contact_cnt auth?*/ 
    936             { PJ_FALSE, 202,    PJ_TRUE,   75,          1,          PJ_FALSE} 
     936            { PJ_FALSE, 202,    PJ_TRUE,    75,         1,          PJ_FALSE} 
    937937        }, 
    938938 
     
    958958            /* client expected results: */ 
    959959            /* error    code    have_reg    expiration  contact_cnt auth?*/ 
    960             { PJ_FALSE, 200,    PJ_TRUE,   65,          2,          PJ_FALSE} 
     960            { PJ_FALSE, 200,    PJ_TRUE,    65,         2,          PJ_FALSE} 
    961961        }, 
    962962 
     
    980980            /* client expected results: */ 
    981981            /* error    code    have_reg    expiration  contact_cnt auth?*/ 
    982             { PJ_FALSE, 200,    PJ_TRUE,   65,          0,          PJ_FALSE} 
     982            { PJ_FALSE, 200,    PJ_TRUE,    65,         0,          PJ_FALSE} 
    983983        }, 
    984984 
     
    10011001            /* client expected results: */ 
    10021002            /* error    code    have_reg    expiration  contact_cnt auth?*/ 
    1003             { PJ_FALSE, 200,    PJ_TRUE,   600,         0,          PJ_FALSE} 
     1003            { PJ_FALSE, 200,    PJ_TRUE,    600,        0,          PJ_FALSE} 
    10041004        }, 
    10051005    }; 
Note: See TracChangeset for help on using the changeset viewer.