Changeset 2152 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c
- Timestamp:
- Jul 17, 2008 2:54:03 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c
r2134 r2152 2068 2068 unsigned old_decor; 2069 2069 unsigned i; 2070 char buf[1024];2071 2070 2072 2071 PJ_LOG(3,(THIS_FILE, "Start dumping application states:")); … … 2103 2102 pjsip_ua_dump(detail); 2104 2103 2105 2104 // Dumping complete call states may require a 'large' buffer 2105 // (about 3KB per call session, including RTCP XR). 2106 #if 0 2106 2107 /* Dump all invite sessions: */ 2107 2108 PJ_LOG(3,(THIS_FILE, "Dumping invite sessions:")); … … 2116 2117 for (i=0; i<pjsua_var.ua_cfg.max_calls; ++i) { 2117 2118 if (pjsua_call_is_active(i)) { 2119 /* Tricky logging, since call states log string tends to be 2120 * longer than PJ_LOG_MAX_SIZE. 2121 */ 2122 char buf[1024 * 3]; 2123 unsigned call_dump_len; 2124 unsigned part_len; 2125 unsigned part_idx; 2126 unsigned log_decor; 2127 2118 2128 pjsua_call_dump(i, detail, buf, sizeof(buf), " "); 2119 PJ_LOG(3,(THIS_FILE, "%s", buf)); 2129 call_dump_len = strlen(buf); 2130 2131 log_decor = pj_log_get_decor(); 2132 pj_log_set_decor(log_decor & ~(PJ_LOG_HAS_NEWLINE | 2133 PJ_LOG_HAS_CR)); 2134 PJ_LOG(3,(THIS_FILE, "\n")); 2135 pj_log_set_decor(0); 2136 2137 part_idx = 0; 2138 part_len = PJ_LOG_MAX_SIZE-80; 2139 while (part_idx < call_dump_len) { 2140 char p_orig, *p; 2141 2142 p = &buf[part_idx]; 2143 if (part_idx + part_len > call_dump_len) 2144 part_len = call_dump_len - part_idx; 2145 p_orig = p[part_len]; 2146 p[part_len] = '\0'; 2147 PJ_LOG(3,(THIS_FILE, "%s", p)); 2148 p[part_len] = p_orig; 2149 part_idx += part_len; 2150 } 2151 pj_log_set_decor(log_decor); 2120 2152 } 2121 2153 } 2122 2154 } 2155 #endif 2123 2156 2124 2157 /* Dump presence status */
Note: See TracChangeset
for help on using the changeset viewer.