Changeset 4634


Ignore:
Timestamp:
Oct 23, 2013 9:29:35 AM (10 years ago)
Author:
riza
Message:

Re #1643: Fix some build warnings detected on VS2012

Location:
pjproject/trunk/pjsip-apps/src/pjsua
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c

    r4603 r4634  
    326326                  call_info.remote_info.ptr, 
    327327                  call_info.local_info.ptr, 
    328                   (app_config.use_cli?"c a":"a"), 
    329                   (app_config.use_cli?"c g":"h"))); 
     328                  (app_config.use_cli?"ca a":"a"), 
     329                  (app_config.use_cli?"g":"h"))); 
    330330    } 
    331331} 
     
    848848    } 
    849849 
    850     body.ptr = mwi_info->rdata->msg_info.msg->body->data; 
     850    body.ptr = (char *)mwi_info->rdata->msg_info.msg->body->data; 
    851851    body.slen = mwi_info->rdata->msg_info.msg->body->len; 
    852852 
     
    10781078 
    10791079    status = pjsip_endpt_create_response(pjsua_get_pjsip_endpt(), 
    1080                                 rdata, 200, NULL, &tdata); 
     1080                                        rdata, 200, NULL, &tdata); 
    10811081    if (status != PJ_SUCCESS) 
    10821082    return; 
    10831083 
    1084     exp = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_EXPIRES, NULL); 
     1084    exp = (pjsip_expires_hdr *)pjsip_msg_find_hdr(rdata->msg_info.msg,  
     1085                                                  PJSIP_H_EXPIRES, NULL); 
    10851086 
    10861087    h = rdata->msg_info.msg->hdr.next; 
    10871088    while (h != &rdata->msg_info.msg->hdr) { 
    1088     if (h->type == PJSIP_H_CONTACT) { 
    1089     const pjsip_contact_hdr *c = (const pjsip_contact_hdr*)h; 
    1090     int e = c->expires; 
    1091  
    1092     if (e < 0) { 
    1093         if (exp) 
    1094             e = exp->ivalue; 
    1095         else 
    1096             e = 3600; 
    1097     } 
    1098  
    1099     if (e > 0) { 
    1100         pjsip_contact_hdr *nc = pjsip_hdr_clone(tdata->pool, h); 
    1101         nc->expires = e; 
    1102         pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)nc); 
    1103         ++cnt; 
    1104     } 
    1105     } 
    1106     h = h->next; 
     1089        if (h->type == PJSIP_H_CONTACT) { 
     1090            const pjsip_contact_hdr *c = (const pjsip_contact_hdr*)h; 
     1091            int e = c->expires; 
     1092 
     1093            if (e < 0) { 
     1094                if (exp) 
     1095                    e = exp->ivalue; 
     1096                else 
     1097                    e = 3600; 
     1098            } 
     1099 
     1100            if (e > 0) { 
     1101                pjsip_contact_hdr *nc = (pjsip_contact_hdr *)pjsip_hdr_clone( 
     1102                                                                tdata->pool, h); 
     1103                nc->expires = e; 
     1104                pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)nc); 
     1105                ++cnt; 
     1106            } 
     1107        } 
     1108        h = h->next; 
    11071109    } 
    11081110 
     
    11651167                                             PJSIP_H_ALLOW, NULL); 
    11661168        if (cap_hdr) { 
    1167             pjsip_msg_add_hdr(tdata->msg, pjsip_hdr_clone(tdata->pool,  
    1168                                                            cap_hdr)); 
     1169            pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr *)pjsip_hdr_clone( 
     1170                                                         tdata->pool, cap_hdr)); 
    11691171        } 
    11701172    } 
  • pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app_cli.c

    r4580 r4634  
    16441644     */ 
    16451645    if (next) { 
    1646         find_next_call(current_call); 
     1646        find_next_call(); 
    16471647    } else { 
    1648         find_prev_call(current_call); 
     1648        find_prev_call(); 
    16491649    } 
    16501650 
Note: See TracChangeset for help on using the changeset viewer.