Changeset 1930
- Timestamp:
- Apr 15, 2008 10:35:32 AM (17 years ago)
- Location:
- pjproject/branches/projects/ice-turn07/pjsip/src/pjsua-lib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/ice-turn07/pjsip/src/pjsua-lib/pjsua_acc.c
r1908 r1930 566 566 pjsip_regc_destroy(acc->regc); 567 567 acc->regc = NULL; 568 acc->contact.slen = 0; 568 569 } 569 570 … … 854 855 pjsip_regc_destroy(acc->regc); 855 856 acc->regc = NULL; 857 acc->contact.slen = 0; 856 858 857 859 /* Stop keep-alive timer if any. */ … … 864 866 pjsip_regc_destroy(acc->regc); 865 867 acc->regc = NULL; 868 acc->contact.slen = 0; 866 869 867 870 /* Stop keep-alive timer if any. */ … … 873 876 pjsip_regc_destroy(acc->regc); 874 877 acc->regc = NULL; 878 acc->contact.slen = 0; 875 879 876 880 /* Stop keep-alive timer if any. */ … … 941 945 pjsip_regc_destroy(acc->regc); 942 946 acc->regc = NULL; 947 acc->contact.slen = 0; 943 948 } 944 949 … … 987 992 pj_pool_release(pool); 988 993 acc->regc = NULL; 994 acc->contact.slen = 0; 989 995 return status; 990 996 } -
pjproject/branches/projects/ice-turn07/pjsip/src/pjsua-lib/pjsua_call.c
r1912 r1930 406 406 call->res_time.sec = 0; 407 407 408 /* Create suitable Contact header */ 409 status = pjsua_acc_create_uac_contact(pjsua_var.pool, &contact, 410 acc_id, dest_uri); 411 if (status != PJ_SUCCESS) { 412 pjsua_perror(THIS_FILE, "Unable to generate Contact header", status); 413 PJSUA_UNLOCK(); 414 return status; 408 /* Create suitable Contact header unless a Contact header has been 409 * set in the account. 410 */ 411 if (acc->contact.slen) { 412 contact = acc->contact; 413 } else { 414 status = pjsua_acc_create_uac_contact(pjsua_var.pool, &contact, 415 acc_id, dest_uri); 416 if (status != PJ_SUCCESS) { 417 pjsua_perror(THIS_FILE, "Unable to generate Contact header", 418 status); 419 PJSUA_UNLOCK(); 420 return status; 421 } 415 422 } 416 423 … … 788 795 789 796 /* Get suitable Contact header */ 790 status = pjsua_acc_create_uas_contact(rdata->tp_info.pool, &contact, 791 acc_id, rdata); 792 if (status != PJ_SUCCESS) { 793 pjsua_perror(THIS_FILE, "Unable to generate Contact header", status); 794 pjsip_endpt_respond_stateless(pjsua_var.endpt, rdata, 500, NULL, 795 NULL, NULL); 796 pjsua_media_channel_deinit(call->index); 797 PJSUA_UNLOCK(); 798 return PJ_TRUE; 797 if (pjsua_var.acc[acc_id].contact.slen) { 798 contact = pjsua_var.acc[acc_id].contact; 799 } else { 800 status = pjsua_acc_create_uas_contact(rdata->tp_info.pool, &contact, 801 acc_id, rdata); 802 if (status != PJ_SUCCESS) { 803 pjsua_perror(THIS_FILE, "Unable to generate Contact header", 804 status); 805 pjsip_endpt_respond_stateless(pjsua_var.endpt, rdata, 500, NULL, 806 NULL, NULL); 807 pjsua_media_channel_deinit(call->index); 808 PJSUA_UNLOCK(); 809 return PJ_TRUE; 810 } 799 811 } 800 812 -
pjproject/branches/projects/ice-turn07/pjsip/src/pjsua-lib/pjsua_pres.c
r1569 r1930 553 553 554 554 /* Create suitable Contact header */ 555 status = pjsua_acc_create_uas_contact(rdata->tp_info.pool, &contact, 556 acc_id, rdata); 557 if (status != PJ_SUCCESS) { 558 pjsua_perror(THIS_FILE, "Unable to generate Contact header", status); 559 PJSUA_UNLOCK(); 560 return PJ_TRUE; 555 if (acc->contact.slen) { 556 contact = acc->contact; 557 } else { 558 status = pjsua_acc_create_uas_contact(rdata->tp_info.pool, &contact, 559 acc_id, rdata); 560 if (status != PJ_SUCCESS) { 561 pjsua_perror(THIS_FILE, "Unable to generate Contact header", 562 status); 563 PJSUA_UNLOCK(); 564 return PJ_TRUE; 565 } 561 566 } 562 567 … … 1124 1129 acc_id, index)); 1125 1130 1126 /* Generate suitable Contact header */ 1127 status = pjsua_acc_create_uac_contact(pjsua_var.pool, &contact, 1128 acc_id, &buddy->uri); 1129 if (status != PJ_SUCCESS) { 1130 pjsua_perror(THIS_FILE, "Unable to generate Contact header", status); 1131 return; 1131 /* Generate suitable Contact header unless one is already set in 1132 * the account 1133 */ 1134 if (acc->contact.slen) { 1135 contact = acc->contact; 1136 } else { 1137 status = pjsua_acc_create_uac_contact(pjsua_var.pool, &contact, 1138 acc_id, &buddy->uri); 1139 if (status != PJ_SUCCESS) { 1140 pjsua_perror(THIS_FILE, "Unable to generate Contact header", 1141 status); 1142 return; 1143 } 1132 1144 } 1133 1145
Note: See TracChangeset
for help on using the changeset viewer.