- Timestamp:
- Apr 11, 2012 10:01:00 AM (13 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk
- Property svn:mergeinfo changed
/pjproject/branches/1.x merged: 4032-4033,4037
- Property svn:mergeinfo changed
-
pjproject/trunk/pjsip/include/pjsip-ua/sip_regc.h
r3553 r4038 266 266 const pjsip_tpselector *sel); 267 267 268 /** 269 * Release the reference to current transport being used by the regc, if any. 270 * The regc keeps the reference to the last transport being used in order 271 * to prevent it from being destroyed. In some situation however, such as 272 * when the transport is disconnected, it is necessary to instruct the 273 * regc to release this reference so that the transport can be destroyed. 274 * See https://trac.pjsip.org/repos/ticket/1481 for background info. 275 * 276 * @param regc The client registration instance. 277 * 278 * @return PJ_SUCCESS on success, or the appropriate error code. 279 */ 280 PJ_DECL(pj_status_t) pjsip_regc_release_transport(pjsip_regc *regc); 268 281 269 282 /** -
pjproject/trunk/pjsip/include/pjsip/sip_config.h
r3999 r4038 428 428 429 429 /** 430 * Idle timeout interval to be applied to transports with no usage 431 * before the transport is destroyed. Value is in seconds. 430 * Idle timeout interval to be applied to outgoing transports (i.e. client 431 * side) with no usage before the transport is destroyed. Value is in 432 * seconds. 432 433 * 433 434 * Default: 30 … … 435 436 #ifndef PJSIP_TRANSPORT_IDLE_TIME 436 437 # define PJSIP_TRANSPORT_IDLE_TIME 30 438 #endif 439 440 441 /** 442 * Idle timeout interval to be applied to incoming transports (i.e. server 443 * side) with no usage before the transport is destroyed. Server typically 444 * should let client close the connection, hence set this interval to a large 445 * value. Value is in seconds. 446 * 447 * Default: 600 448 */ 449 #ifndef PJSIP_TRANSPORT_SERVER_IDLE_TIME 450 # define PJSIP_TRANSPORT_SERVER_IDLE_TIME 600 437 451 #endif 438 452 -
pjproject/trunk/pjsip/src/pjsip-ua/sip_reg.c
r3553 r4038 441 441 } 442 442 443 /* Release transport */ 444 PJ_DEF(pj_status_t) pjsip_regc_release_transport(pjsip_regc *regc) 445 { 446 PJ_ASSERT_RETURN(regc, PJ_EINVAL); 447 if (regc->last_transport) { 448 pjsip_transport_dec_ref(regc->last_transport); 449 regc->last_transport = NULL; 450 } 451 return PJ_SUCCESS; 452 } 453 443 454 444 455 PJ_DEF(pj_status_t) pjsip_regc_add_headers( pjsip_regc *regc, … … 1270 1281 1271 1282 /* Get last transport used and add reference to it */ 1272 if (tdata->tp_info.transport != regc->last_transport) { 1283 if (tdata->tp_info.transport != regc->last_transport && 1284 status==PJ_SUCCESS) 1285 { 1273 1286 if (regc->last_transport) { 1274 1287 pjsip_transport_dec_ref(regc->last_transport); -
pjproject/trunk/pjsip/src/pjsip/sip_transport.c
r3553 r4038 858 858 delay.sec = delay.msec = 0; 859 859 } else { 860 delay.sec = PJSIP_TRANSPORT_IDLE_TIME; 860 delay.sec = (tp->dir==PJSIP_TP_DIR_OUTGOING) ? 861 PJSIP_TRANSPORT_IDLE_TIME : 862 PJSIP_TRANSPORT_SERVER_IDLE_TIME; 861 863 delay.msec = 0; 862 864 } -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c
r3891 r4038 2883 2883 } 2884 2884 2885 /* Release regc transport immediately 2886 * See https://trac.pjsip.org/repos/ticket/1481 2887 */ 2888 if (pjsua_var.acc[i].regc) { 2889 pjsip_regc_release_transport(pjsua_var.acc[i].regc); 2890 } 2891 2885 2892 /* Schedule reregistration for this account */ 2886 2893 schedule_reregistration(acc);
Note: See TracChangeset
for help on using the changeset viewer.