Changeset 195 for pjproject/trunk/pjsip/src
- Timestamp:
- Feb 19, 2006 1:34:57 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip/sip_transaction.c
r175 r195 419 419 PJ_ASSERT_RETURN(mod_tsx_layer.endpt==NULL, PJ_EINVALIDOP); 420 420 421 PJ_LOG(5,(THIS_FILE, "Initializing transaction layer module"));422 423 421 /* Initialize TLS ID for transaction lock. */ 424 422 status = pj_thread_local_alloc(&pjsip_tsx_lock_tls_id); … … 468 466 return status; 469 467 } 470 471 PJ_LOG(4,(THIS_FILE, "Transaction layer module initialized"));472 468 473 469 return PJ_SUCCESS; … … 763 759 } 764 760 761 762 /* 763 * Dump transaction layer. 764 */ 765 PJ_DEF(void) pjsip_tsx_layer_dump(void) 766 { 767 #if PJ_LOG_MAX_LEVEL >= 3 768 pj_hash_iterator_t itbuf, *it; 769 770 /* Lock mutex. */ 771 pj_mutex_lock(mod_tsx_layer.mutex); 772 773 PJ_LOG(3, (THIS_FILE, "Dumping transaction table:")); 774 775 it = pj_hash_first(mod_tsx_layer.htable, &itbuf); 776 if (it == NULL) { 777 PJ_LOG(3, (THIS_FILE, " - none - ")); 778 } else { 779 while (it != NULL) { 780 pjsip_transaction *tsx = pj_hash_this( mod_tsx_layer.htable, it); 781 782 PJ_LOG(3, (THIS_FILE, " %s %s|%d|%s", 783 tsx->obj_name, 784 (tsx->last_tx? pjsip_tx_data_get_info(tsx->last_tx): "none"), 785 tsx->status_code, 786 pjsip_tsx_state_str(tsx->state))); 787 788 it = pj_hash_next(mod_tsx_layer.htable, it); 789 } 790 } 791 792 /* Unlock mutex. */ 793 pj_mutex_unlock(mod_tsx_layer.mutex); 794 #endif 795 } 765 796 766 797 /***************************************************************************** … … 1447 1478 char errmsg[PJ_ERR_MSG_SIZE]; 1448 1479 1480 tsx->transport_err = -sent; 1481 1449 1482 PJ_LOG(4,(tsx->obj_name, 1450 1483 "Failed to send %s! err=%d (%s)", … … 1490 1523 struct tsx_lock_data lck; 1491 1524 char errmsg[PJ_ERR_MSG_SIZE]; 1525 1526 tsx->transport_err = -sent; 1492 1527 1493 1528 PJ_LOG(4,(tsx->obj_name, "Transport failed to send %s! Err=%d (%s)", … … 1612 1647 /* Check if transaction is terminated. */ 1613 1648 if (status==PJ_SUCCESS && tsx->state == PJSIP_TSX_STATE_TERMINATED) 1614 status = PJSIP_ETSXDESTROYED;1649 status = tsx->transport_err; 1615 1650 1616 1651 } else { … … 1627 1662 /* Check if transaction is terminated. */ 1628 1663 if (status==PJ_SUCCESS && tsx->state == PJSIP_TSX_STATE_TERMINATED) 1629 status = PJSIP_ETSXDESTROYED;1664 status = tsx->transport_err; 1630 1665 1631 1666 }
Note: See TracChangeset
for help on using the changeset viewer.