Ignore:
Timestamp:
May 2, 2007 5:14:29 AM (17 years ago)
Author:
bennylp
Message:

Ported PJSIP and PJSIP-SIMPLE to Symbian

File:
1 edited

Legend:

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

    r1146 r1241  
    8989                                    const pj_str_t *value) 
    9090{ 
    91     pj_xml_attr *attr = pj_pool_alloc(pool, sizeof(*attr)); 
     91    pj_xml_attr *attr = PJ_POOL_ALLOC_T(pool, pj_xml_attr); 
    9292    attr->name = *name; 
    9393    pj_strdup(pool, &attr->value, value); 
     
    111111                                            const pj_str_t *id) 
    112112{ 
    113     pjpidf_tuple *t = pj_pool_alloc(pool, sizeof(*t)); 
     113    pjpidf_tuple *t = PJ_POOL_ALLOC_T(pool, pjpidf_tuple); 
    114114    pjpidf_tuple_construct(pool, t, id); 
    115115    pj_xml_add_node(pres, t); 
     
    130130static pj_bool_t find_tuple_by_id(pj_xml_node *node, const void *id) 
    131131{ 
    132     return pj_xml_find_attr(node, &ID, id) != NULL; 
     132    return pj_xml_find_attr(node, &ID, (const pj_str_t*)id) != NULL; 
    133133} 
    134134 
     
    147147                                          const pj_str_t *text) 
    148148{ 
    149     pjpidf_note *note = pj_pool_alloc(pool, sizeof(*note)); 
     149    pjpidf_note *note = PJ_POOL_ALLOC_T(pool, pjpidf_note); 
    150150    xml_init_node(pool, note, &NOTE, text); 
    151151    pj_xml_add_node(pres, note); 
     
    174174    attr = xml_create_attr(pool, &ID, id); 
    175175    pj_xml_add_attr(t, attr); 
    176     st = pj_pool_alloc(pool, sizeof(*st)); 
     176    st = PJ_POOL_ALLOC_T(pool, pjpidf_status); 
    177177    pjpidf_status_construct(pool, st); 
    178178    pj_xml_add_node(t, st); 
     
    215215    pj_xml_node *node = pj_xml_find_node(t, &CONTACT); 
    216216    if (!node) { 
    217         node = pj_pool_alloc(pool, sizeof(*node)); 
     217        node = PJ_POOL_ALLOC_T(pool, pj_xml_node); 
    218218        xml_init_node(pool, node, &CONTACT, contact); 
    219219        pj_xml_add_node(t, node); 
     
    230230 
    231231    if (!node) { 
    232         node = pj_pool_alloc(pool, sizeof(*node)); 
     232        node = PJ_POOL_ALLOC_T(pool, pj_xml_node); 
    233233        xml_init_node(pool, node, &CONTACT, NULL); 
    234234        pj_xml_add_node(t, node); 
     
    260260                                           const pj_str_t *text) 
    261261{ 
    262     pjpidf_note *note = pj_pool_alloc(pool, sizeof(*note)); 
     262    pjpidf_note *note = PJ_POOL_ALLOC_T(pool, pjpidf_note); 
    263263    xml_init_node(pool, note, &NOTE, text); 
    264264    pj_xml_add_node(t, note); 
     
    288288    pj_xml_node *node = pj_xml_find_node(t, &TIMESTAMP); 
    289289    if (!node) { 
    290         node = pj_pool_alloc(pool, sizeof(*node)); 
     290        node = PJ_POOL_ALLOC_T(pool, pj_xml_node); 
    291291        xml_init_node(pool, node, &TIMESTAMP, ts); 
    292292    } else { 
     
    301301    pj_xml_node *node = pj_xml_find_node(t, &TIMESTAMP); 
    302302    if (!node) { 
    303         node = pj_pool_alloc(pool, sizeof(*node)); 
     303        node = PJ_POOL_ALLOC_T(pool, pj_xml_node); 
    304304        xml_init_node(pool, node, &TIMESTAMP, ts); 
    305305    } else { 
     
    315315 
    316316    xml_init_node(pool, st, &STATUS, NULL); 
    317     node = pj_pool_alloc(pool, sizeof(*node)); 
     317    node = PJ_POOL_ALLOC_T(pool, pj_xml_node); 
    318318    xml_init_node(pool, node, &BASIC, &CLOSED); 
    319319    pj_xml_add_node(st, node); 
     
    336336PJ_DEF(pjpidf_pres*) pjpidf_create(pj_pool_t *pool, const pj_str_t *entity) 
    337337{ 
    338     pjpidf_pres *pres = pj_pool_alloc(pool, sizeof(*pres)); 
     338    pjpidf_pres *pres = PJ_POOL_ALLOC_T(pool, pjpidf_pres); 
    339339    pjpidf_pres_construct(pool, pres, entity); 
    340340    return pres; 
Note: See TracChangeset for help on using the changeset viewer.