Ignore:
Timestamp:
May 11, 2007 3:14:34 PM (17 years ago)
Author:
bennylp
Message:

HUGE changeset to make the rest of the libraries compile with C++ mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_pres.c

    r1087 r1266  
    3838PJ_DEF(pj_bool_t) pjsua_buddy_is_valid(pjsua_buddy_id buddy_id) 
    3939{ 
    40     return buddy_id>=0 && buddy_id<PJ_ARRAY_SIZE(pjsua_var.buddy) && 
     40    return buddy_id>=0 && buddy_id<(int)PJ_ARRAY_SIZE(pjsua_var.buddy) && 
    4141           pjsua_var.buddy[buddy_id].uri.slen != 0; 
    4242} 
     
    153153 
    154154    /* Find empty slot */ 
    155     for (index=0; index<PJ_ARRAY_SIZE(pjsua_var.buddy); ++index) { 
     155    for (index=0; index<(int)PJ_ARRAY_SIZE(pjsua_var.buddy); ++index) { 
    156156        if (pjsua_var.buddy[index].uri.slen == 0) 
    157157            break; 
     
    424424    PJSUA_LOCK(); 
    425425 
    426     uapres = pjsip_evsub_get_mod_data(sub, pjsua_var.mod.id); 
     426    uapres = (pjsua_srv_pres*) pjsip_evsub_get_mod_data(sub, pjsua_var.mod.id); 
    427427    if (uapres) { 
    428428        PJ_LOG(3,(THIS_FILE, "Server subscription to %s is %s", 
     
    517517 
    518518    /* Attach our data to the subscription: */ 
    519     uapres = pj_pool_alloc(dlg->pool, sizeof(pjsua_srv_pres)); 
     519    uapres = PJ_POOL_ALLOC_T(dlg->pool, pjsua_srv_pres); 
    520520    uapres->sub = sub; 
    521     uapres->remote = pj_pool_alloc(dlg->pool, PJSIP_MAX_URL_SIZE); 
     521    uapres->remote = (char*) pj_pool_alloc(dlg->pool, PJSIP_MAX_URL_SIZE); 
    522522    status = pjsip_uri_print(PJSIP_URI_IN_REQ_URI, dlg->remote.info->uri, 
    523523                             uapres->remote, PJSIP_MAX_URL_SIZE); 
     
    586586static void publish_cb(struct pjsip_publishc_cbparam *param) 
    587587{ 
    588     pjsua_acc *acc = param->token; 
     588    pjsua_acc *acc = (pjsua_acc*) param->token; 
    589589 
    590590    if (param->code/100 != 2 || param->status != PJ_SUCCESS) { 
     
    856856    PJSUA_LOCK(); 
    857857 
    858     buddy = pjsip_evsub_get_mod_data(sub, pjsua_var.mod.id); 
     858    buddy = (pjsua_buddy*) pjsip_evsub_get_mod_data(sub, pjsua_var.mod.id); 
    859859    if (buddy) { 
    860860        PJ_LOG(3,(THIS_FILE,  
     
    889889    PJSUA_LOCK(); 
    890890 
    891     buddy = pjsip_evsub_get_mod_data(sub, pjsua_var.mod.id); 
     891    buddy = (pjsua_buddy*) pjsip_evsub_get_mod_data(sub, pjsua_var.mod.id); 
    892892    if (!buddy) { 
    893893        PJSUA_UNLOCK(); 
     
    915915 
    916916    /* Find contact header. */ 
    917     contact_hdr = pjsip_msg_find_hdr(event->body.rx_msg.rdata->msg_info.msg, 
     917    contact_hdr = (pjsip_contact_hdr*) 
     918                  pjsip_msg_find_hdr(event->body.rx_msg.rdata->msg_info.msg, 
    918919                                     PJSIP_H_CONTACT, NULL); 
    919920    if (!contact_hdr) { 
     
    922923    } 
    923924 
    924     buddy->contact.ptr = pj_pool_alloc(pjsua_var.pool, PJSIP_MAX_URL_SIZE); 
     925    buddy->contact.ptr = (char*) 
     926                         pj_pool_alloc(pjsua_var.pool, PJSIP_MAX_URL_SIZE); 
    925927    buddy->contact.slen = pjsip_uri_print( PJSIP_URI_IN_CONTACT_HDR, 
    926928                                           contact_hdr->uri, 
     
    946948    PJSUA_LOCK(); 
    947949 
    948     buddy = pjsip_evsub_get_mod_data(sub, pjsua_var.mod.id); 
     950    buddy = (pjsua_buddy*) pjsip_evsub_get_mod_data(sub, pjsua_var.mod.id); 
    949951    if (buddy) { 
    950952        /* Update our info. */ 
Note: See TracChangeset for help on using the changeset viewer.