Changeset 1266 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_pres.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_pres.c
r1087 r1266 38 38 PJ_DEF(pj_bool_t) pjsua_buddy_is_valid(pjsua_buddy_id buddy_id) 39 39 { 40 return buddy_id>=0 && buddy_id< PJ_ARRAY_SIZE(pjsua_var.buddy) &&40 return buddy_id>=0 && buddy_id<(int)PJ_ARRAY_SIZE(pjsua_var.buddy) && 41 41 pjsua_var.buddy[buddy_id].uri.slen != 0; 42 42 } … … 153 153 154 154 /* Find empty slot */ 155 for (index=0; index< PJ_ARRAY_SIZE(pjsua_var.buddy); ++index) {155 for (index=0; index<(int)PJ_ARRAY_SIZE(pjsua_var.buddy); ++index) { 156 156 if (pjsua_var.buddy[index].uri.slen == 0) 157 157 break; … … 424 424 PJSUA_LOCK(); 425 425 426 uapres = pjsip_evsub_get_mod_data(sub, pjsua_var.mod.id);426 uapres = (pjsua_srv_pres*) pjsip_evsub_get_mod_data(sub, pjsua_var.mod.id); 427 427 if (uapres) { 428 428 PJ_LOG(3,(THIS_FILE, "Server subscription to %s is %s", … … 517 517 518 518 /* Attach our data to the subscription: */ 519 uapres = pj_pool_alloc(dlg->pool, sizeof(pjsua_srv_pres));519 uapres = PJ_POOL_ALLOC_T(dlg->pool, pjsua_srv_pres); 520 520 uapres->sub = sub; 521 uapres->remote = pj_pool_alloc(dlg->pool, PJSIP_MAX_URL_SIZE);521 uapres->remote = (char*) pj_pool_alloc(dlg->pool, PJSIP_MAX_URL_SIZE); 522 522 status = pjsip_uri_print(PJSIP_URI_IN_REQ_URI, dlg->remote.info->uri, 523 523 uapres->remote, PJSIP_MAX_URL_SIZE); … … 586 586 static void publish_cb(struct pjsip_publishc_cbparam *param) 587 587 { 588 pjsua_acc *acc = param->token;588 pjsua_acc *acc = (pjsua_acc*) param->token; 589 589 590 590 if (param->code/100 != 2 || param->status != PJ_SUCCESS) { … … 856 856 PJSUA_LOCK(); 857 857 858 buddy = pjsip_evsub_get_mod_data(sub, pjsua_var.mod.id);858 buddy = (pjsua_buddy*) pjsip_evsub_get_mod_data(sub, pjsua_var.mod.id); 859 859 if (buddy) { 860 860 PJ_LOG(3,(THIS_FILE, … … 889 889 PJSUA_LOCK(); 890 890 891 buddy = pjsip_evsub_get_mod_data(sub, pjsua_var.mod.id);891 buddy = (pjsua_buddy*) pjsip_evsub_get_mod_data(sub, pjsua_var.mod.id); 892 892 if (!buddy) { 893 893 PJSUA_UNLOCK(); … … 915 915 916 916 /* Find contact header. */ 917 contact_hdr = pjsip_msg_find_hdr(event->body.rx_msg.rdata->msg_info.msg, 917 contact_hdr = (pjsip_contact_hdr*) 918 pjsip_msg_find_hdr(event->body.rx_msg.rdata->msg_info.msg, 918 919 PJSIP_H_CONTACT, NULL); 919 920 if (!contact_hdr) { … … 922 923 } 923 924 924 buddy->contact.ptr = pj_pool_alloc(pjsua_var.pool, PJSIP_MAX_URL_SIZE); 925 buddy->contact.ptr = (char*) 926 pj_pool_alloc(pjsua_var.pool, PJSIP_MAX_URL_SIZE); 925 927 buddy->contact.slen = pjsip_uri_print( PJSIP_URI_IN_CONTACT_HDR, 926 928 contact_hdr->uri, … … 946 948 PJSUA_LOCK(); 947 949 948 buddy = pjsip_evsub_get_mod_data(sub, pjsua_var.mod.id);950 buddy = (pjsua_buddy*) pjsip_evsub_get_mod_data(sub, pjsua_var.mod.id); 949 951 if (buddy) { 950 952 /* Update our info. */
Note: See TracChangeset
for help on using the changeset viewer.