Removed out-commented code.

FossilOrigin-Name: d58d35ba938751e69697ab39e8757b4706b0714161d07b0bcd42b7062d2f95ea
This commit is contained in:
7u83@mail.ru 2015-04-13 14:07:19 +00:00
parent 9ba2c11f5b
commit 294e95f2a1
1 changed files with 0 additions and 120 deletions

View File

@ -379,126 +379,6 @@ void cw_dbg_msg(int level,struct conn *conn, uint8_t * packet, int len,struct so
cw_dbg(level,"%s",buf);
}
/*
void cw_dbg_packet_m(struct conn *conn, uint8_t * packet, int len)
{
if (!cw_dbg_is_level(DBG_PKT_IN | DBG_PKT_OUT))
return;
char hdr[200];
hdr_print(hdr, packet, len);
if (!cw_dbg_is_level(DBG_PKT_DMP)) {
cw_dbg(DBG_PKT_IN, "Processing capwap packet from %s, len=%d\n%s",
sock_addr2str(&conn->addr), len, hdr);
return;
}
cw_dbg_dmp(DBG_PKT_DMP, packet, len,
"Processing packet from %s, len=%d\n%s\n\tDump:",
sock_addr2str(&conn->addr), len, hdr);
}
*/
/*
void ycw_dbg_dmp_(int level, const char *file, int line,
const uint8_t * data, int len, const char *format, ...)
{
if (!(level & cw_dbg_opt_level))
return;
int maxtlen = 2048;
int i;
int rowlen = CW_LOG_DUMP_ROW_LEN;
int rows = len / rowlen;
int tlen = 0;
int md;
if (cw_dbg_opt_display & DBG_DISP_ASC_DMP)
md = 2;
else
md = 1;
char *dst = malloc(2*(md * (len * 3 + (rows * 2) + 8 + maxtlen)));
if (!dst)
return;
if (format != NULL) {
va_list args;
va_start(args, format);
tlen = vsnprintf(dst, maxtlen, format, args);
va_end(args);
}
if (len % CW_LOG_DUMP_ROW_LEN)
rows++;
char *pdst = dst + tlen;
sprintf(pdst, "\n\t");
pdst += 2;
char asc_buffer[128];
char *ascdst = asc_buffer;
for (i = 0; i < len; i++) {
sprintf(pdst, "%02X ", data[i] & 0xff);
if (cw_dbg_opt_display & DBG_DISP_ASC_DMP) {
int c = data[i] & 0xff;
if (c < 0x20 || c > 0x7f)
c = '.';
*ascdst = c;
ascdst++;
}
pdst += 3;
if ((i + 1) % rowlen == 0) {
int l;
if (cw_dbg_opt_display & DBG_DISP_ASC_DMP) {
*ascdst = 0;
l = sprintf(pdst, " | %s\n\t", asc_buffer);
ascdst = asc_buffer;
} else {
l = sprintf(pdst, "\n\t");
}
pdst += l;
}
}
if (cw_dbg_opt_display & DBG_DISP_ASC_DMP) {
*ascdst = 0;
if (strlen(asc_buffer))
pdst += sprintf(pdst, " | %s", asc_buffer);
}
cw_log_cb(LOG_DEBUG, "%s",dst);
free(dst);
return;
}
*/
static int cw_format_vendor(char *dst, uint32_t vendor_id, int elem_id,
const uint8_t * elem_data)
{