Changeset 1241 for pjproject/trunk/pjsip/src/pjsip/sip_ua_layer.c
- Timestamp:
- May 2, 2007 5:14:29 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip/sip_ua_layer.c
r989 r1241 166 166 167 167 /* Get the dialog where this transaction belongs. */ 168 dlg = tsx->mod_data[mod_ua.mod.id];168 dlg = (pjsip_dialog*) tsx->mod_data[mod_ua.mod.id]; 169 169 170 170 /* If dialog instance has gone, it could mean that the dialog … … 245 245 246 246 set_key->slen = call_id->slen + local_tag->slen + 1; 247 set_key->ptr = pj_pool_alloc(pool, set_key->slen);247 set_key->ptr = (char*) pj_pool_alloc(pool, set_key->slen); 248 248 pj_assert(set_key->ptr != NULL); 249 249 … … 268 268 return set; 269 269 } else { 270 set = pj_pool_alloc(mod_ua.pool, sizeof(struct dlg_set));270 set = PJ_POOL_ALLOC_T(mod_ua.pool, struct dlg_set); 271 271 return set; 272 272 } … … 299 299 struct dlg_set *dlg_set; 300 300 301 dlg_set = pj_hash_get( mod_ua.dlg_table, dlg->local.info->tag.ptr, 301 dlg_set = (struct dlg_set*) 302 pj_hash_get( mod_ua.dlg_table, dlg->local.info->tag.ptr, 302 303 dlg->local.info->tag.slen, 303 304 &dlg->local.tag_hval); … … 367 368 368 369 /* Find this dialog from the dialog set. */ 369 dlg_set = dlg->dlg_set;370 dlg_set = (struct dlg_set*) dlg->dlg_set; 370 371 d = dlg_set->dlg_list.next; 371 372 while (d != (pjsip_dialog*)&dlg_set->dlg_list && d != dlg) { … … 401 402 PJ_DEF(pjsip_dialog*) pjsip_rdata_get_dlg( pjsip_rx_data *rdata ) 402 403 { 403 return rdata->endpt_info.mod_data[mod_ua.mod.id];404 return (pjsip_dialog*) rdata->endpt_info.mod_data[mod_ua.mod.id]; 404 405 } 405 406 406 407 PJ_DEF(pjsip_dialog*) pjsip_tsx_get_dlg( pjsip_transaction *tsx ) 407 408 { 408 return tsx->mod_data[mod_ua.mod.id];409 return (pjsip_dialog*) tsx->mod_data[mod_ua.mod.id]; 409 410 } 410 411 … … 427 428 428 429 /* Lookup the dialog set. */ 429 dlg_set = pj_hash_get(mod_ua.dlg_table, local_tag->ptr, local_tag->slen, 430 dlg_set = (struct dlg_set*) 431 pj_hash_get(mod_ua.dlg_table, local_tag->ptr, local_tag->slen, 430 432 NULL); 431 433 if (dlg_set == NULL) { … … 517 519 /* We should find the dialog attached to the INVITE transaction */ 518 520 if (tsx) { 519 dlg = tsx->mod_data[mod_ua.mod.id];521 dlg = (pjsip_dialog*) tsx->mod_data[mod_ua.mod.id]; 520 522 pj_mutex_unlock(tsx->mutex); 521 523 … … 523 525 * (e.g. during debugging where initially there is a dialog) 524 526 */ 525 return dlg ? dlg->dlg_set : NULL;527 return dlg ? (struct dlg_set*) dlg->dlg_set : NULL; 526 528 527 529 } else { … … 540 542 541 543 /* Lookup the dialog set. */ 542 dlg_set = pj_hash_get(mod_ua.dlg_table, tag->ptr, tag->slen, NULL); 544 dlg_set = (struct dlg_set*) 545 pj_hash_get(mod_ua.dlg_table, tag->ptr, tag->slen, NULL); 543 546 return dlg_set; 544 547 } … … 705 708 706 709 /* Get the dialog set. */ 707 dlg_set = dlg->dlg_set;710 dlg_set = (struct dlg_set*) dlg->dlg_set; 708 711 709 712 /* Even if transaction is found and (candidate) dialog has been … … 733 736 734 737 /* Get the dialog set. */ 735 dlg_set = pj_hash_get(mod_ua.dlg_table, 738 dlg_set = (struct dlg_set*) 739 pj_hash_get(mod_ua.dlg_table, 736 740 rdata->msg_info.from->tag.ptr, 737 741 rdata->msg_info.from->tag.slen, … … 918 922 const char *title; 919 923 920 dlg_set = pj_hash_this(mod_ua.dlg_table, it);924 dlg_set = (struct dlg_set*) pj_hash_this(mod_ua.dlg_table, it); 921 925 if (!dlg_set || pj_list_empty(&dlg_set->dlg_list)) continue; 922 926
Note: See TracChangeset
for help on using the changeset viewer.