- Timestamp:
- Feb 24, 2007 3:33:54 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_pres.c
r998 r1000 623 623 /* Create PUBLISH request */ 624 624 if (active) { 625 char *bpos; 626 pj_str_t entity; 627 625 628 status = pjsip_publishc_publish(acc->publish_sess, PJ_TRUE, &tdata); 626 629 if (status != PJ_SUCCESS) { … … 634 637 pres_status.info[0].basic_open = acc->online_status; 635 638 639 /* Be careful not to send PIDF with presence entity ID containing 640 * "<" character. 641 */ 642 if ((bpos=pj_strchr(&acc_cfg->id, '<')) != NULL) { 643 char *epos = pj_strchr(&acc_cfg->id, '>'); 644 if (epos - bpos < 2) { 645 pj_assert(!"Unexpected invalid URI"); 646 status = PJSIP_EINVALIDURI; 647 goto on_error; 648 } 649 entity.ptr = bpos+1; 650 entity.slen = epos - bpos - 1; 651 } else { 652 entity = acc_cfg->id; 653 } 654 636 655 /* Create and add PIDF message body */ 637 656 status = pjsip_pres_create_pidf(tdata->pool, &pres_status, 638 & acc_cfg->id, &tdata->msg->body);657 &entity, &tdata->msg->body); 639 658 if (status != PJ_SUCCESS) { 640 659 pjsua_perror(THIS_FILE, "Error creating PIDF for PUBLISH request",
Note: See TracChangeset
for help on using the changeset viewer.