- Timestamp:
- Feb 20, 2017 1:23:54 AM (8 years ago)
- Location:
- pjproject/trunk/pjsip
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsip/sip_config.h
r5336 r5557 1243 1243 1244 1244 /** 1245 * Default delay for retrying session refresh request upon 1246 * receiving transport error (503). Set it to -1 to end the session 1247 * immediately instead. 1248 * 1249 * Default: 10 seconds 1250 */ 1251 #ifndef PJSIP_SESS_TIMER_RETRY_DELAY 1252 # define PJSIP_SESS_TIMER_RETRY_DELAY 10 1253 #endif 1254 1255 1256 /** 1245 1257 * Specify whether the client publication session should queue the 1246 1258 * PUBLISH request should there be another PUBLISH transaction still -
pjproject/trunk/pjsip/src/pjsip-ua/sip_timer.c
r5488 r5557 971 971 972 972 PJ_LOG(3, (inv->pool->obj_name, 973 "Receive error %d for refresh request %.*s/cseq=%d, " 974 "stopping session now", st_code, 975 event->body.tsx_state.tsx->method.name.slen, 973 "Receive error %d for refresh request %.*s/cseq=%d", 974 st_code, event->body.tsx_state.tsx->method.name.slen, 976 975 event->body.tsx_state.tsx->method.name.ptr, 977 976 event->body.tsx_state.tsx->cseq)); 978 977 979 status = pjsip_inv_end_session(inv, 978 if (st_code == 503 && PJSIP_SESS_TIMER_RETRY_DELAY >= 0) { 979 /* Retry the refresh after some delay */ 980 pj_time_val delay = {PJSIP_SESS_TIMER_RETRY_DELAY, 0}; 981 982 PJ_LOG(3, (inv->pool->obj_name, "Scheduling to retry refresh " 983 "request after %d second(s)", delay.sec)); 984 985 inv->timer->timer.id = 1; 986 pjsip_endpt_schedule_timer(inv->dlg->endpt, 987 &inv->timer->timer, &delay); 988 } else { 989 PJ_LOG(3, (inv->pool->obj_name, "Ending session now")); 990 991 status = pjsip_inv_end_session(inv, 980 992 event->body.tsx_state.tsx->status_code, 981 993 pjsip_get_status_text(st_code), 982 994 &bye); 983 995 984 if (status == PJ_SUCCESS && bye)985 status = pjsip_inv_send_msg(inv, bye);986 996 if (status == PJ_SUCCESS && bye) 997 status = pjsip_inv_send_msg(inv, bye); 998 } 987 999 } 988 1000 }
Note: See TracChangeset
for help on using the changeset viewer.