Index: pjproject/trunk/pjnath/include/pjnath/stun_session.h
===================================================================
--- pjproject/trunk/pjnath/include/pjnath/stun_session.h	(revision 4351)
+++ pjproject/trunk/pjnath/include/pjnath/stun_session.h	(revision 4352)
@@ -683,4 +683,6 @@
  * @param sess	    The STUN session instance.
  * @param tdata	    The request message previously sent.
+ * @param mod_count Boolean flag to indicate whether transmission count
+ *                  needs to be incremented.
  *
  * @return	    PJ_SUCCESS on success, or the appropriate error.
@@ -690,5 +692,6 @@
  */
 PJ_DECL(pj_status_t) pj_stun_session_retransmit_req(pj_stun_session *sess,
-						    pj_stun_tx_data *tdata);
+						    pj_stun_tx_data *tdata,
+                                                    pj_bool_t mod_count);
 
 
Index: pjproject/trunk/pjnath/include/pjnath/stun_transaction.h
===================================================================
--- pjproject/trunk/pjnath/include/pjnath/stun_transaction.h	(revision 4351)
+++ pjproject/trunk/pjnath/include/pjnath/stun_transaction.h	(revision 4352)
@@ -235,4 +235,6 @@
  *
  * @param tsx		The STUN client transaction instance.
+ * @param mod_count     Boolean flag to indicate whether transmission count
+ *                      needs to be incremented.
  *
  * @return		PJ_SUCCESS on success, or PJNATH_ESTUNDESTROYED 
@@ -241,5 +243,6 @@
  *			as returned by \a on_send_msg() callback.
  */
-PJ_DECL(pj_status_t) pj_stun_client_tsx_retransmit(pj_stun_client_tsx *tsx);
+PJ_DECL(pj_status_t) pj_stun_client_tsx_retransmit(pj_stun_client_tsx *tsx,
+                                                   pj_bool_t mod_count);
 
 
Index: pjproject/trunk/pjnath/src/pjnath/ice_session.c
===================================================================
--- pjproject/trunk/pjnath/src/pjnath/ice_session.c	(revision 4351)
+++ pjproject/trunk/pjnath/src/pjnath/ice_session.c	(revision 4352)
@@ -2743,5 +2743,5 @@
 		  "because it's in progress. Retransmitting", i));
 	    pj_log_push_indent();
-	    pj_stun_session_retransmit_req(comp->stun_sess, c->tdata);
+	    pj_stun_session_retransmit_req(comp->stun_sess, c->tdata, PJ_FALSE);
 	    pj_log_pop_indent();
 
Index: pjproject/trunk/pjnath/src/pjnath/stun_session.c
===================================================================
--- pjproject/trunk/pjnath/src/pjnath/stun_session.c	(revision 4351)
+++ pjproject/trunk/pjnath/src/pjnath/stun_session.c	(revision 4352)
@@ -1055,5 +1055,6 @@
  */
 PJ_DEF(pj_status_t) pj_stun_session_retransmit_req(pj_stun_session *sess,
-						   pj_stun_tx_data *tdata)
+						   pj_stun_tx_data *tdata,
+                                                   pj_bool_t mod_count)
 {
     pj_status_t status;
@@ -1066,5 +1067,5 @@
     pj_lock_acquire(sess->lock);
 
-    status = pj_stun_client_tsx_retransmit(tdata->client_tsx);
+    status = pj_stun_client_tsx_retransmit(tdata->client_tsx, mod_count);
 
     pj_lock_release(sess->lock);
Index: pjproject/trunk/pjnath/src/pjnath/stun_transaction.c
===================================================================
--- pjproject/trunk/pjnath/src/pjnath/stun_transaction.c	(revision 4351)
+++ pjproject/trunk/pjnath/src/pjnath/stun_transaction.c	(revision 4352)
@@ -181,5 +181,6 @@
  * Transmit message.
  */
-static pj_status_t tsx_transmit_msg(pj_stun_client_tsx *tsx)
+static pj_status_t tsx_transmit_msg(pj_stun_client_tsx *tsx,
+                                    pj_bool_t mod_count)
 {
     pj_status_t status;
@@ -188,5 +189,5 @@
 		     !tsx->require_retransmit, PJ_EBUSY);
 
-    if (tsx->require_retransmit) {
+    if (tsx->require_retransmit && mod_count) {
 	/* Calculate retransmit/timeout delay */
 	if (tsx->transmit_count == 0) {
@@ -222,5 +223,6 @@
 
 
-    tsx->transmit_count++;
+    if (mod_count)
+        tsx->transmit_count++;
 
     PJ_LOG(5,(tsx->obj_name, "STUN sending message (transmit count=%d)",
@@ -234,5 +236,5 @@
 	/* We've been destroyed, don't access the object. */
     } else if (status != PJ_SUCCESS) {
-	if (tsx->retransmit_timer.id != 0) {
+	if (tsx->retransmit_timer.id != 0 && mod_count) {
 	    pj_timer_heap_cancel(tsx->timer_heap, 
 				 &tsx->retransmit_timer);
@@ -296,5 +298,5 @@
 
     /* Send the message */
-    status = tsx_transmit_msg(tsx);
+    status = tsx_transmit_msg(tsx, PJ_TRUE);
     if (status != PJ_SUCCESS) {
 	if (tsx->retransmit_timer.id != 0) {
@@ -336,5 +338,5 @@
 
     tsx->retransmit_timer.id = 0;
-    status = tsx_transmit_msg(tsx);
+    status = tsx_transmit_msg(tsx, PJ_TRUE);
     if (status == PJNATH_ESTUNDESTROYED) {
 	/* We've been destroyed, don't try to access the object */
@@ -354,5 +356,6 @@
  * Request to retransmit the request.
  */
-PJ_DEF(pj_status_t) pj_stun_client_tsx_retransmit(pj_stun_client_tsx *tsx)
+PJ_DEF(pj_status_t) pj_stun_client_tsx_retransmit(pj_stun_client_tsx *tsx,
+                                                  pj_bool_t mod_count)
 {
     if (tsx->destroy_timer.id != 0) {
@@ -365,5 +368,5 @@
     }
 
-    return tsx_transmit_msg(tsx);
+    return tsx_transmit_msg(tsx, mod_count);
 }
 
