Changeset 1241 for pjproject/trunk/pjsip/src/pjsip/sip_transaction.c
- Timestamp:
- May 2, 2007 5:14:29 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip/sip_transaction.c
r1210 r1241 289 289 9 + /* Via port. */ 290 290 16; /* Separator+Allowance. */ 291 key = p = pj_pool_alloc(pool, len_required);291 key = p = (char*) pj_pool_alloc(pool, len_required); 292 292 end = p + len_required; 293 293 … … 356 356 PJ_ASSERT_RETURN(pool && key && method && branch, PJ_EINVAL); 357 357 358 p = key->ptr = pj_pool_alloc(pool, branch->slen + method->name.slen + 4 ); 358 p = key->ptr = (char*) 359 pj_pool_alloc(pool, branch->slen + method->name.slen + 4 ); 359 360 360 361 /* Add role. */ … … 594 595 595 596 pj_mutex_lock(mod_tsx_layer.mutex); 596 tsx = pj_hash_get( mod_tsx_layer.htable, key->ptr, key->slen, &hval ); 597 tsx = (pjsip_transaction*) 598 pj_hash_get( mod_tsx_layer.htable, key->ptr, key->slen, &hval ); 597 599 pj_mutex_unlock(mod_tsx_layer.mutex); 598 600 … … 645 647 it = pj_hash_first(mod_tsx_layer.htable, &it_buf); 646 648 while (it) { 647 pjsip_transaction *tsx = pj_hash_this(mod_tsx_layer.htable, it); 649 pjsip_transaction *tsx = (pjsip_transaction*) 650 pj_hash_this(mod_tsx_layer.htable, it); 648 651 pj_hash_iterator_t *next = pj_hash_next(mod_tsx_layer.htable, it); 649 652 if (tsx) { … … 706 709 pj_mutex_lock( mod_tsx_layer.mutex ); 707 710 708 tsx = pj_hash_get( mod_tsx_layer.htable, key.ptr, key.slen, &hval ); 711 tsx = (pjsip_transaction*) 712 pj_hash_get( mod_tsx_layer.htable, key.ptr, key.slen, &hval ); 709 713 710 714 … … 754 758 pj_mutex_lock( mod_tsx_layer.mutex ); 755 759 756 tsx = pj_hash_get( mod_tsx_layer.htable, key.ptr, key.slen, &hval ); 760 tsx = (pjsip_transaction*) 761 pj_hash_get( mod_tsx_layer.htable, key.ptr, key.slen, &hval ); 757 762 758 763 … … 792 797 PJ_DEF(pjsip_transaction*) pjsip_rdata_get_tsx( pjsip_rx_data *rdata ) 793 798 { 794 return rdata->endpt_info.mod_data[mod_tsx_layer.mod.id]; 799 return (pjsip_transaction*) 800 rdata->endpt_info.mod_data[mod_tsx_layer.mod.id]; 795 801 } 796 802 … … 817 823 } else { 818 824 while (it != NULL) { 819 pjsip_transaction *tsx = pj_hash_this(mod_tsx_layer.htable,it); 825 pjsip_transaction *tsx = (pjsip_transaction*) 826 pj_hash_this(mod_tsx_layer.htable,it); 820 827 821 828 PJ_LOG(3, (THIS_FILE, " %s %s|%d|%s", … … 895 902 return PJ_ENOMEM; 896 903 897 tsx = pj_pool_zalloc(pool, sizeof(pjsip_transaction));904 tsx = PJ_POOL_ZALLOC_T(pool, pjsip_transaction); 898 905 tsx->pool = pool; 899 906 tsx->tsx_user = tsx_user; … … 966 973 967 974 /* Clear TLS, so that mutex will not be unlocked */ 968 lck = pj_thread_local_get(pjsip_tsx_lock_tls_id);975 lck = (struct tsx_lock_data*) pj_thread_local_get(pjsip_tsx_lock_tls_id); 969 976 while (lck) { 970 977 if (lck->tsx == tsx) { … … 990 997 { 991 998 pjsip_event event; 992 pjsip_transaction *tsx = entry->user_data;999 pjsip_transaction *tsx = (pjsip_transaction*) entry->user_data; 993 1000 struct tsx_lock_data lck; 994 1001 … … 1043 1050 */ 1044 1051 if (event_src_type==PJSIP_EVENT_RX_MSG && tsx->tsx_user) { 1045 pjsip_rx_data *rdata = event_src;1052 pjsip_rx_data *rdata = (pjsip_rx_data*) event_src; 1046 1053 1047 1054 pj_assert(rdata != NULL); … … 1124 1131 1125 1132 /* Make sure CSeq header is present. */ 1126 cseq = pjsip_msg_find_hdr(msg, PJSIP_H_CSEQ, NULL);1133 cseq = (pjsip_cseq_hdr*) pjsip_msg_find_hdr(msg, PJSIP_H_CSEQ, NULL); 1127 1134 if (!cseq) { 1128 1135 pj_assert(!"CSeq header not present in outgoing message!"); … … 1150 1157 1151 1158 /* Generate Via header if it doesn't exist. */ 1152 via = pjsip_msg_find_hdr(msg, PJSIP_H_VIA, NULL);1159 via = (pjsip_via_hdr*) pjsip_msg_find_hdr(msg, PJSIP_H_VIA, NULL); 1153 1160 if (via == NULL) { 1154 1161 via = pjsip_via_hdr_create(tdata->pool); … … 1159 1166 if (via->branch_param.slen == 0) { 1160 1167 pj_str_t tmp; 1161 via->branch_param.ptr = pj_pool_alloc(tsx->pool, PJSIP_MAX_BRANCH_LEN); 1168 via->branch_param.ptr = (char*) 1169 pj_pool_alloc(tsx->pool, PJSIP_MAX_BRANCH_LEN); 1162 1170 via->branch_param.slen = PJSIP_MAX_BRANCH_LEN; 1163 1171 pj_memcpy(via->branch_param.ptr, PJSIP_RFC3261_BRANCH_ID, … … 1510 1518 pj_ssize_t sent, pj_bool_t *cont ) 1511 1519 { 1512 pjsip_transaction *tsx = send_state->token;1520 pjsip_transaction *tsx = (pjsip_transaction*) send_state->token; 1513 1521 struct tsx_lock_data lck; 1514 1522 … … 1630 1638 { 1631 1639 if (sent < 0) { 1632 pjsip_transaction *tsx = token;1640 pjsip_transaction *tsx = (pjsip_transaction*) token; 1633 1641 struct tsx_lock_data lck; 1634 1642 char errmsg[PJ_ERR_MSG_SIZE]; … … 2274 2282 */ 2275 2283 if (!tsx->is_reliable) { 2276 pjsip_cseq_hdr *cseq = pjsip_msg_find_hdr( msg, PJSIP_H_CSEQ, 2284 pjsip_cseq_hdr *cseq = (pjsip_cseq_hdr*) 2285 pjsip_msg_find_hdr( msg, PJSIP_H_CSEQ, 2277 2286 NULL); 2278 2287 if (cseq->method.id == PJSIP_INVITE_METHOD) {
Note: See TracChangeset
for help on using the changeset viewer.