Changeset 4213
- Timestamp:
- Jul 23, 2012 1:31:26 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip-ua/sip_timer.c
r3999 r4213 1031 1031 /* Add Session-Expires header and start the timer */ 1032 1032 add_timer_headers(inv, tdata, PJ_TRUE, PJ_FALSE); 1033 1034 /* Add 'timer' to Require header (see ticket #1560). */ 1035 if (inv->timer->refresher == TR_UAC) { 1036 pjsip_require_hdr *req_hdr; 1037 pj_bool_t req_hdr_has_timer = PJ_FALSE; 1038 1039 req_hdr = (pjsip_require_hdr*) 1040 pjsip_msg_find_hdr(tdata->msg, PJSIP_H_REQUIRE, 1041 NULL); 1042 if (req_hdr == NULL) { 1043 req_hdr = pjsip_require_hdr_create(tdata->pool); 1044 PJ_ASSERT_RETURN(req_hdr, PJ_ENOMEM); 1045 pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)req_hdr); 1046 } else { 1047 unsigned i; 1048 for (i = 0; i < req_hdr->count; ++i) { 1049 if (pj_stricmp(&req_hdr->values[i], &STR_TIMER)) { 1050 req_hdr_has_timer = PJ_TRUE; 1051 break; 1052 } 1053 } 1054 } 1055 if (!req_hdr_has_timer) 1056 req_hdr->values[req_hdr->count++] = STR_TIMER; 1057 } 1058 1059 /* Finally, start timer. */ 1033 1060 start_timer(inv); 1034 1061 }
Note: See TracChangeset
for help on using the changeset viewer.