Changeset 4352 for pjproject/trunk/pjnath/src/pjnath/stun_transaction.c
- Timestamp:
- Feb 19, 2013 2:37:28 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.