Changeset 1266 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_im.c
- Timestamp:
- May 11, 2007 3:14:34 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_im.c
r1242 r1266 113 113 * "text/plain". 114 114 */ 115 ctype = pjsip_msg_find_hdr(msg, PJSIP_H_CONTENT_TYPE, NULL); 115 ctype = (pjsip_ctype_hdr*) 116 pjsip_msg_find_hdr(msg, PJSIP_H_CONTENT_TYPE, NULL); 116 117 if (msg->body == NULL || ctype == NULL || 117 118 !acceptable_message(&ctype->media)) … … 143 144 144 145 /* Build remote contact */ 145 contact_hdr = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 146 contact_hdr = (pjsip_contact_hdr*) 147 pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 146 148 NULL); 147 149 if (contact_hdr) { 148 contact.ptr = pj_pool_alloc(rdata->tp_info.pool,149 PJSIP_MAX_URL_SIZE);150 contact.ptr = (char*) pj_pool_alloc(rdata->tp_info.pool, 151 PJSIP_MAX_URL_SIZE); 150 152 contact.slen = pjsip_uri_print(PJSIP_URI_IN_CONTACT_HDR, 151 153 contact_hdr->uri, contact.ptr, … … 163 165 164 166 /* Save text body */ 165 text_body.ptr = rdata->msg_info.msg->body->data;167 text_body.ptr = (char*) rdata->msg_info.msg->body->data; 166 168 text_body.slen = rdata->msg_info.msg->body->len; 167 169 … … 176 178 pj_bool_t is_typing; 177 179 178 status = pjsip_iscomposing_parse( rdata->tp_info.pool,body->data,179 180 180 status = pjsip_iscomposing_parse(rdata->tp_info.pool, (char*)body->data, 181 body->len, &is_typing, NULL, NULL, 182 NULL ); 181 183 if (status != PJ_SUCCESS) { 182 184 pjsua_perror(THIS_FILE, "Invalid MESSAGE body", status); … … 241 243 * not available, then use From header. 242 244 */ 243 from.ptr = pj_pool_alloc(rdata->tp_info.pool, PJSIP_MAX_URL_SIZE); 244 contact_hdr = pjsip_msg_find_hdr(rdata->msg_info.msg, 245 from.ptr = (char*) pj_pool_alloc(rdata->tp_info.pool, PJSIP_MAX_URL_SIZE); 246 contact_hdr = (pjsip_contact_hdr*) 247 pjsip_msg_find_hdr(rdata->msg_info.msg, 245 248 PJSIP_H_CONTACT, NULL); 246 249 if (contact_hdr) { … … 258 261 259 262 /* Build the To text. */ 260 to.ptr = pj_pool_alloc(rdata->tp_info.pool, PJSIP_MAX_URL_SIZE);263 to.ptr = (char*) pj_pool_alloc(rdata->tp_info.pool, PJSIP_MAX_URL_SIZE); 261 264 to.slen = pjsip_uri_print( PJSIP_URI_IN_FROMTO_HDR, 262 265 rdata->msg_info.to->uri, … … 276 279 static void im_callback(void *token, pjsip_event *e) 277 280 { 278 pjsua_im_data *im_data = token;281 pjsua_im_data *im_data = (pjsua_im_data*) token; 279 282 280 283 if (e->type == PJSIP_EVENT_TSX_STATE) { … … 353 356 static void typing_callback(void *token, pjsip_event *e) 354 357 { 355 pjsua_im_data *im_data = token;358 pjsua_im_data *im_data = (pjsua_im_data*) token; 356 359 357 360 if (e->type == PJSIP_EVENT_TSX_STATE) { … … 464 467 * application on the callback 465 468 */ 466 im_data = pj_pool_zalloc(tdata->pool, sizeof(*im_data));469 im_data = PJ_POOL_ZALLOC_T(tdata->pool, pjsua_im_data); 467 470 im_data->acc_id = acc_id; 468 471 im_data->call_id = PJSUA_INVALID_ID; … … 571 574 572 575 /* Create data to reauthenticate */ 573 im_data = pj_pool_zalloc(tdata->pool, sizeof(*im_data));576 im_data = PJ_POOL_ZALLOC_T(tdata->pool, pjsua_im_data); 574 577 im_data->acc_id = acc_id; 575 578
Note: See TracChangeset
for help on using the changeset viewer.