Changeset 3337 for pjproject/trunk/pjsip/src/pjsip-simple/presence.c
- Timestamp:
- Oct 12, 2010 11:35:55 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip-simple/presence.c
r2762 r3337 22 22 #include <pjsip-simple/evsub_msg.h> 23 23 #include <pjsip/sip_module.h> 24 #include <pjsip/sip_multipart.h> 24 25 #include <pjsip/sip_endpoint.h> 25 26 #include <pjsip/sip_dialog.h> … … 683 684 pjsip_hdr *res_hdr) 684 685 { 686 const pj_str_t STR_MULTIPART = { "multipart", 9 }; 685 687 pjsip_ctype_hdr *ctype_hdr; 686 688 pj_status_t status; … … 708 710 709 711 /* Parse content. */ 710 712 if (pj_stricmp(&ctype_hdr->media.type, &STR_MULTIPART)==0) { 713 pjsip_multipart_part *mpart; 714 pjsip_media_type ctype; 715 716 pjsip_media_type_init(&ctype, (pj_str_t*)&STR_APPLICATION, 717 (pj_str_t*)&STR_PIDF_XML); 718 mpart = pjsip_multipart_find_part(rdata->msg_info.msg->body, 719 &ctype, NULL); 720 if (mpart) { 721 status = pjsip_pres_parse_pidf2((char*)mpart->body->data, 722 mpart->body->len, pres->tmp_pool, 723 &pres->tmp_status); 724 } 725 726 if (mpart==NULL) { 727 pjsip_media_type_init(&ctype, (pj_str_t*)&STR_APPLICATION, 728 (pj_str_t*)&STR_XPIDF_XML); 729 mpart = pjsip_multipart_find_part(rdata->msg_info.msg->body, 730 &ctype, NULL); 731 if (mpart) { 732 status = pjsip_pres_parse_xpidf2((char*)mpart->body->data, 733 mpart->body->len, 734 pres->tmp_pool, 735 &pres->tmp_status); 736 } else { 737 status = PJSIP_SIMPLE_EBADCONTENT; 738 } 739 } 740 } 741 else 711 742 if (pj_stricmp(&ctype_hdr->media.type, &STR_APPLICATION)==0 && 712 743 pj_stricmp(&ctype_hdr->media.subtype, &STR_PIDF_XML)==0)
Note: See TracChangeset
for help on using the changeset viewer.