- Timestamp:
- Feb 27, 2013 11:57:43 AM (12 years ago)
- Location:
- pjproject/branches/1.x
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/1.x
- Property svn:mergeinfo changed
/pjproject/trunk merged: 4258-4260
- Property svn:mergeinfo changed
-
pjproject/branches/1.x/pjsip/src/pjsip/sip_transport_tcp.c
r3553 r4393 74 74 PJ_DECL_LIST_MEMBER(struct delayed_tdata); 75 75 pjsip_tx_data_op_key *tdata_op_key; 76 pj_time_val timeout; 76 77 }; 77 78 … … 650 651 static void tcp_flush_pending_tx(struct tcp_transport *tcp) 651 652 { 653 pj_time_val now; 654 655 pj_gettickcount(&now); 652 656 pj_lock_acquire(tcp->base.lock); 653 657 while (!pj_list_empty(&tcp->delayed_list)) { … … 663 667 tdata = pending_tx->tdata_op_key->tdata; 664 668 op_key = (pj_ioqueue_op_key_t*)pending_tx->tdata_op_key; 669 670 if (pending_tx->timeout.sec > 0 && 671 PJ_TIME_VAL_GT(now, pending_tx->timeout)) 672 { 673 continue; 674 } 665 675 666 676 /* send! */ … … 1123 1133 * connect() is still in progress. Put the transmit data to 1124 1134 * the delayed list. 1135 * Starting from #1583 (https://trac.pjsip.org/repos/ticket/1583), 1136 * we also add timeout value for the transmit data. When the 1137 * connect() is completed, the timeout value will be checked to 1138 * determine whether the transmit data needs to be sent. 1125 1139 */ 1126 delayed_tdata = PJ_POOL_ ALLOC_T(tdata->pool,1127 struct delayed_tdata);1140 delayed_tdata = PJ_POOL_ZALLOC_T(tdata->pool, 1141 struct delayed_tdata); 1128 1142 delayed_tdata->tdata_op_key = &tdata->op_key; 1143 if (tdata->msg && tdata->msg->type == PJSIP_REQUEST_MSG) { 1144 pj_gettickcount(&delayed_tdata->timeout); 1145 delayed_tdata->timeout.msec += pjsip_cfg()->tsx.td; 1146 pj_time_val_normalize(&delayed_tdata->timeout); 1147 } 1129 1148 1130 1149 pj_list_push_back(&tcp->delayed_list, delayed_tdata); -
pjproject/branches/1.x/pjsip/src/pjsip/sip_transport_tls.c
r4376 r4393 72 72 PJ_DECL_LIST_MEMBER(struct delayed_tdata); 73 73 pjsip_tx_data_op_key *tdata_op_key; 74 pj_time_val timeout; 74 75 }; 75 76 … … 648 649 static void tls_flush_pending_tx(struct tls_transport *tls) 649 650 { 651 pj_time_val now; 652 653 pj_gettickcount(&now); 650 654 pj_lock_acquire(tls->base.lock); 651 655 while (!pj_list_empty(&tls->delayed_list)) { … … 661 665 tdata = pending_tx->tdata_op_key->tdata; 662 666 op_key = (pj_ioqueue_op_key_t*)pending_tx->tdata_op_key; 667 668 if (pending_tx->timeout.sec > 0 && 669 PJ_TIME_VAL_GT(now, pending_tx->timeout)) 670 { 671 continue; 672 } 663 673 664 674 /* send! */ … … 1218 1228 * connect() is still in progress. Put the transmit data to 1219 1229 * the delayed list. 1230 * Starting from #1583 (https://trac.pjsip.org/repos/ticket/1583), 1231 * we also add timeout value for the transmit data. When the 1232 * connect() is completed, the timeout value will be checked to 1233 * determine whether the transmit data needs to be sent. 1220 1234 */ 1221 delayed_tdata = PJ_POOL_ ALLOC_T(tdata->pool,1222 struct delayed_tdata);1235 delayed_tdata = PJ_POOL_ZALLOC_T(tdata->pool, 1236 struct delayed_tdata); 1223 1237 delayed_tdata->tdata_op_key = &tdata->op_key; 1238 if (tdata->msg && tdata->msg->type == PJSIP_REQUEST_MSG) { 1239 pj_gettickcount(&delayed_tdata->timeout); 1240 delayed_tdata->timeout.msec += pjsip_cfg()->tsx.td; 1241 pj_time_val_normalize(&delayed_tdata->timeout); 1242 } 1224 1243 1225 1244 pj_list_push_back(&tls->delayed_list, delayed_tdata);
Note: See TracChangeset
for help on using the changeset viewer.