Changeset 3753 for pjproject/trunk/pjnath/src/pjnath/ice_session.c
- Timestamp:
- Sep 18, 2011 2:59:56 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/src/pjnath/ice_session.c
r3553 r3753 1749 1749 "Sending connectivity check for check %s", 1750 1750 dump_check(ice->tmp.txt, sizeof(ice->tmp.txt), clist, check))); 1751 pj_log_push_indent(); 1751 1752 1752 1753 /* Create request */ … … 1756 1757 if (status != PJ_SUCCESS) { 1757 1758 pjnath_perror(ice->obj_name, "Error creating STUN request", status); 1759 pj_log_pop_indent(); 1758 1760 return status; 1759 1761 } … … 1812 1814 check->tdata = NULL; 1813 1815 pjnath_perror(ice->obj_name, "Error sending STUN request", status); 1816 pj_log_pop_indent(); 1814 1817 return status; 1815 1818 } … … 1817 1820 check_set_state(ice, check, PJ_ICE_SESS_CHECK_STATE_IN_PROGRESS, 1818 1821 PJ_SUCCESS); 1822 pj_log_pop_indent(); 1819 1823 return PJ_SUCCESS; 1820 1824 } … … 1846 1850 1847 1851 LOG5((ice->obj_name, "Starting checklist periodic check")); 1852 pj_log_push_indent(); 1848 1853 1849 1854 /* Send STUN Binding request for check with highest priority on … … 1857 1862 if (status != PJ_SUCCESS) { 1858 1863 pj_mutex_unlock(ice->mutex); 1864 pj_log_pop_indent(); 1859 1865 return status; 1860 1866 } … … 1876 1882 if (status != PJ_SUCCESS) { 1877 1883 pj_mutex_unlock(ice->mutex); 1884 pj_log_pop_indent(); 1878 1885 return status; 1879 1886 } … … 1897 1904 1898 1905 pj_mutex_unlock(ice->mutex); 1906 pj_log_pop_indent(); 1899 1907 return PJ_SUCCESS; 1900 1908 } … … 1909 1917 1910 1918 LOG4((ice->obj_name, "Starting nominated check..")); 1919 pj_log_push_indent(); 1911 1920 1912 1921 pj_assert(ice->is_nominating == PJ_FALSE); … … 1959 1968 1960 1969 ice->is_nominating = PJ_TRUE; 1970 pj_log_pop_indent(); 1961 1971 } 1962 1972 … … 2006 2016 2007 2017 LOG4((ice->obj_name, "Starting ICE check..")); 2018 pj_log_push_indent(); 2008 2019 2009 2020 /* If we are using aggressive nomination, set the is_nominating state */ … … 2033 2044 pj_assert(!"Unable to find checklist for component 1"); 2034 2045 pj_mutex_unlock(ice->mutex); 2046 pj_log_pop_indent(); 2035 2047 return PJNATH_EICEINCOMPID; 2036 2048 } … … 2073 2085 "Performing delayed triggerred check for component %d", 2074 2086 rcheck->comp_id)); 2087 pj_log_push_indent(); 2075 2088 handle_incoming_check(ice, rcheck); 2076 2089 rcheck = rcheck->next; 2090 pj_log_pop_indent(); 2077 2091 } 2078 2092 pj_list_init(&ice->early_check); … … 2092 2106 2093 2107 pj_mutex_unlock(ice->mutex); 2108 pj_log_pop_indent(); 2094 2109 return status; 2095 2110 } … … 2194 2209 /* Resend request */ 2195 2210 LOG4((ice->obj_name, "Resending check because of role conflict")); 2211 pj_log_push_indent(); 2196 2212 check_set_state(ice, check, PJ_ICE_SESS_CHECK_STATE_WAITING, 0); 2197 2213 perform_check(ice, clist, msg_data->data.req.ckid, 2198 2214 check->nominated || ice->is_nominating); 2215 pj_log_pop_indent(); 2199 2216 pj_mutex_unlock(ice->mutex); 2200 2217 return; … … 2208 2225 (check->nominated ? " (nominated)" : " (not nominated)"), 2209 2226 errmsg)); 2210 2227 pj_log_push_indent(); 2211 2228 check_set_state(ice, check, PJ_ICE_SESS_CHECK_STATE_FAILED, status); 2212 2229 on_check_complete(ice, check); 2230 pj_log_pop_indent(); 2213 2231 pj_mutex_unlock(ice->mutex); 2214 2232 return; … … 2231 2249 &ice->clist, check), 2232 2250 (check->nominated ? " (nominated)" : " (not nominated)"))); 2251 pj_log_push_indent(); 2233 2252 check_set_state(ice, check, PJ_ICE_SESS_CHECK_STATE_FAILED, status); 2234 2253 on_check_complete(ice, check); 2254 pj_log_pop_indent(); 2235 2255 pj_mutex_unlock(ice->mutex); 2236 2256 return; … … 2703 2723 2704 2724 LOG5((ice->obj_name, "Performing triggered check for check %d",i)); 2725 pj_log_push_indent(); 2705 2726 perform_check(ice, &ice->clist, i, nominate); 2727 pj_log_pop_indent(); 2706 2728 2707 2729 } else if (c->state == PJ_ICE_SESS_CHECK_STATE_IN_PROGRESS) { … … 2710 2732 LOG5((ice->obj_name, "Triggered check for check %d not performed " 2711 2733 "because it's in progress. Retransmitting", i)); 2734 pj_log_push_indent(); 2712 2735 pj_stun_session_retransmit_req(comp->stun_sess, c->tdata); 2736 pj_log_pop_indent(); 2713 2737 2714 2738 } else if (c->state == PJ_ICE_SESS_CHECK_STATE_SUCCEEDED) { … … 2744 2768 LOG5((ice->obj_name, "Triggered check for check %d not performed " 2745 2769 "because it's completed", i)); 2746 2770 pj_log_push_indent(); 2747 2771 complete = on_check_complete(ice, c); 2772 pj_log_pop_indent(); 2748 2773 if (complete) { 2749 2774 return; … … 2774 2799 LOG4((ice->obj_name, "New triggered check added: %d", 2775 2800 ice->clist.count)); 2801 pj_log_push_indent(); 2776 2802 perform_check(ice, &ice->clist, ice->clist.count++, nominate); 2803 pj_log_pop_indent(); 2777 2804 2778 2805 } else { … … 2803 2830 sd = (struct stun_data*) pj_stun_session_get_user_data(sess); 2804 2831 2832 pj_log_push_indent(); 2833 2805 2834 if (msg->hdr.type == PJ_STUN_BINDING_INDICATION) { 2806 2835 LOG5((sd->ice->obj_name, "Received Binding Indication keep-alive " … … 2811 2840 sd->comp_id)); 2812 2841 } 2842 2843 pj_log_pop_indent(); 2813 2844 2814 2845 return PJ_SUCCESS;
Note: See TracChangeset
for help on using the changeset viewer.