Ignore:
Timestamp:
Aug 1, 2010 9:24:58 AM (14 years ago)
Author:
bennylp
Message:

Re #1070 (support for multipart bodies): modified the param field of pjsip_media_type from a simple string to pjsip_param, to support a more complex use of this field

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip-ua/sip_xfer.c

    r2750 r3241  
    375375    pjsip_tx_data *tdata; 
    376376    pjsip_xfer *xfer; 
     377    pjsip_param *param; 
    377378    const pj_str_t reason = { "noresource", 10 }; 
    378379    char *body; 
     
    423424    /* Create SIP message body. */ 
    424425    msg_body = PJ_POOL_ZALLOC_T(tdata->pool, pjsip_msg_body); 
    425     msg_body->content_type.type = STR_MESSAGE; 
    426     msg_body->content_type.subtype = STR_SIPFRAG; 
    427     msg_body->content_type.param = STR_SIPFRAG_VERSION; 
     426    pjsip_media_type_init(&msg_body->content_type, (pj_str_t*)&STR_MESSAGE, 
     427                          (pj_str_t*)&STR_SIPFRAG); 
    428428    msg_body->data = body; 
    429429    msg_body->len = bodylen; 
    430430    msg_body->print_body = &pjsip_print_text_body; 
    431431    msg_body->clone_data = &pjsip_clone_text_data; 
     432 
     433    param = PJ_POOL_ALLOC_T(tdata->pool, pjsip_param); 
     434    param->name = pj_str("version"); 
     435    param->value = pj_str("2.0"); 
     436    pj_list_push_back(&msg_body->content_type.param, param); 
    432437 
    433438    /* Attach sipfrag body. */ 
Note: See TracChangeset for help on using the changeset viewer.