Ignore:
Timestamp:
Jul 1, 2019 7:12:43 AM (5 years ago)
Author:
ming
Message:

Fixed #2209: Insufficient variable storage to contain Expires header field/ parameter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip-simple/publishc.c

    r5984 r6035  
    533533static void call_callback(pjsip_publishc *pubc, pj_status_t status,  
    534534                          int st_code, const pj_str_t *reason, 
    535                           pjsip_rx_data *rdata, pj_int32_t expiration) 
     535                          pjsip_rx_data *rdata, pj_uint32_t expiration) 
    536536{ 
    537537    struct pjsip_publishc_cbparam cbparam; 
     
    563563        char errmsg[PJ_ERR_MSG_SIZE]; 
    564564        pj_str_t reason = pj_strerror(status, errmsg, sizeof(errmsg)); 
    565         call_callback(pubc, status, 400, &reason, NULL, -1); 
     565        call_callback(pubc, status, 400, &reason, NULL, 
     566                      PJSIP_PUBC_EXPIRATION_NOT_SPECIFIED); 
    566567        return; 
    567568    } 
     
    605606            call_callback(pubc, status, tsx->status_code,  
    606607                          &rdata->msg_info.msg->line.status.reason, 
    607                           rdata, -1); 
     608                          rdata, PJSIP_PUBC_EXPIRATION_NOT_SPECIFIED); 
    608609        } else { 
    609610            status = pjsip_publishc_send(pubc, tdata); 
     
    612613    } else { 
    613614        pjsip_rx_data *rdata; 
    614         pj_int32_t expiration = 0xFFFF; 
     615        pj_uint32_t expiration = PJSIP_PUBC_EXPIRATION_NOT_SPECIFIED; 
    615616 
    616617        if (tsx->status_code/100 == 2) { 
     
    639640                expiration = expires->ivalue; 
    640641             
    641             if (pubc->auto_refresh && expiration!=0 && expiration!=0xFFFF) { 
     642            if (pubc->auto_refresh && expiration!=0 && 
     643                expiration!=PJSIP_PUBC_EXPIRATION_NOT_SPECIFIED) 
     644            { 
    642645                pj_time_val delay = { 0, 0}; 
    643646 
     
    672675 
    673676        /* Call callback. */ 
    674         if (expiration == 0xFFFF) expiration = -1; 
     677        // if (expiration == 0xFFFF) expiration = -1; 
    675678 
    676679        /* Temporarily increment pending_tsx to prevent callback from 
Note: See TracChangeset for help on using the changeset viewer.