Changeset 4352 for pjproject/trunk
- Timestamp:
- Feb 19, 2013 2:37:28 PM (12 years ago)
- Location:
- pjproject/trunk/pjnath
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/include/pjnath/stun_session.h
r3553 r4352 683 683 * @param sess The STUN session instance. 684 684 * @param tdata The request message previously sent. 685 * @param mod_count Boolean flag to indicate whether transmission count 686 * needs to be incremented. 685 687 * 686 688 * @return PJ_SUCCESS on success, or the appropriate error. … … 690 692 */ 691 693 PJ_DECL(pj_status_t) pj_stun_session_retransmit_req(pj_stun_session *sess, 692 pj_stun_tx_data *tdata); 694 pj_stun_tx_data *tdata, 695 pj_bool_t mod_count); 693 696 694 697 -
pjproject/trunk/pjnath/include/pjnath/stun_transaction.h
r3553 r4352 235 235 * 236 236 * @param tsx The STUN client transaction instance. 237 * @param mod_count Boolean flag to indicate whether transmission count 238 * needs to be incremented. 237 239 * 238 240 * @return PJ_SUCCESS on success, or PJNATH_ESTUNDESTROYED … … 241 243 * as returned by \a on_send_msg() callback. 242 244 */ 243 PJ_DECL(pj_status_t) pj_stun_client_tsx_retransmit(pj_stun_client_tsx *tsx); 245 PJ_DECL(pj_status_t) pj_stun_client_tsx_retransmit(pj_stun_client_tsx *tsx, 246 pj_bool_t mod_count); 244 247 245 248 -
pjproject/trunk/pjnath/src/pjnath/ice_session.c
r4196 r4352 2743 2743 "because it's in progress. Retransmitting", i)); 2744 2744 pj_log_push_indent(); 2745 pj_stun_session_retransmit_req(comp->stun_sess, c->tdata );2745 pj_stun_session_retransmit_req(comp->stun_sess, c->tdata, PJ_FALSE); 2746 2746 pj_log_pop_indent(); 2747 2747 -
pjproject/trunk/pjnath/src/pjnath/stun_session.c
r4199 r4352 1055 1055 */ 1056 1056 PJ_DEF(pj_status_t) pj_stun_session_retransmit_req(pj_stun_session *sess, 1057 pj_stun_tx_data *tdata) 1057 pj_stun_tx_data *tdata, 1058 pj_bool_t mod_count) 1058 1059 { 1059 1060 pj_status_t status; … … 1066 1067 pj_lock_acquire(sess->lock); 1067 1068 1068 status = pj_stun_client_tsx_retransmit(tdata->client_tsx );1069 status = pj_stun_client_tsx_retransmit(tdata->client_tsx, mod_count); 1069 1070 1070 1071 pj_lock_release(sess->lock); -
pjproject/trunk/pjnath/src/pjnath/stun_transaction.c
r3753 r4352 181 181 * Transmit message. 182 182 */ 183 static pj_status_t tsx_transmit_msg(pj_stun_client_tsx *tsx) 183 static pj_status_t tsx_transmit_msg(pj_stun_client_tsx *tsx, 184 pj_bool_t mod_count) 184 185 { 185 186 pj_status_t status; … … 188 189 !tsx->require_retransmit, PJ_EBUSY); 189 190 190 if (tsx->require_retransmit ) {191 if (tsx->require_retransmit && mod_count) { 191 192 /* Calculate retransmit/timeout delay */ 192 193 if (tsx->transmit_count == 0) { … … 222 223 223 224 224 tsx->transmit_count++; 225 if (mod_count) 226 tsx->transmit_count++; 225 227 226 228 PJ_LOG(5,(tsx->obj_name, "STUN sending message (transmit count=%d)", … … 234 236 /* We've been destroyed, don't access the object. */ 235 237 } else if (status != PJ_SUCCESS) { 236 if (tsx->retransmit_timer.id != 0 ) {238 if (tsx->retransmit_timer.id != 0 && mod_count) { 237 239 pj_timer_heap_cancel(tsx->timer_heap, 238 240 &tsx->retransmit_timer); … … 296 298 297 299 /* Send the message */ 298 status = tsx_transmit_msg(tsx );300 status = tsx_transmit_msg(tsx, PJ_TRUE); 299 301 if (status != PJ_SUCCESS) { 300 302 if (tsx->retransmit_timer.id != 0) { … … 336 338 337 339 tsx->retransmit_timer.id = 0; 338 status = tsx_transmit_msg(tsx );340 status = tsx_transmit_msg(tsx, PJ_TRUE); 339 341 if (status == PJNATH_ESTUNDESTROYED) { 340 342 /* We've been destroyed, don't try to access the object */ … … 354 356 * Request to retransmit the request. 355 357 */ 356 PJ_DEF(pj_status_t) pj_stun_client_tsx_retransmit(pj_stun_client_tsx *tsx) 358 PJ_DEF(pj_status_t) pj_stun_client_tsx_retransmit(pj_stun_client_tsx *tsx, 359 pj_bool_t mod_count) 357 360 { 358 361 if (tsx->destroy_timer.id != 0) { … … 365 368 } 366 369 367 return tsx_transmit_msg(tsx );370 return tsx_transmit_msg(tsx, mod_count); 368 371 } 369 372
Note: See TracChangeset
for help on using the changeset viewer.