Changeset 1399 for trunk/oscam-log.c
- Timestamp:
- 02/02/10 14:20:14 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/oscam-log.c
r1394 r1399 226 226 } 227 227 } 228 229 void cs_debug_mask(unsigned short mask, char *fmt,...) 230 { 231 char txt[256]; 232 if (client[cs_idx].dbglvl & mask) 233 { 234 va_list params; 235 va_start(params, fmt); 236 vsprintf(txt+11, fmt, params); 237 va_end(params); 238 write_to_log(1, txt); 239 } 240 } 241 228 242 int number_of_chars_printed = 0; 229 243 void cs_debug_nolf(char *fmt,...) … … 333 347 } 334 348 349 void cs_ddump_mask(unsigned short mask, uchar *buf, int n, char *fmt, ...) 350 { 351 int i; 352 char txt[512]; 353 354 //if (((cs_ptyp & client[cs_idx].dbglvl)==cs_ptyp) && (fmt)) 355 if ((mask & client[cs_idx].dbglvl) && (fmt)) 356 { 357 va_list params; 358 va_start(params, fmt); 359 vsprintf(txt+11, fmt, params); 360 va_end(params); 361 write_to_log(1, txt); 362 //printf("LOG: %s\n", txt); fflush(stdout); 363 } 364 //if (((cs_ptyp | D_DUMP) & client[cs_idx].dbglvl)==(cs_ptyp | D_DUMP)) 365 if (mask & client[cs_idx].dbglvl) 366 { 367 for (i=0; i<n; i+=16) 368 { 369 sprintf(txt+11, "%s", cs_hexdump(1, buf+i, (n-i>16) ? 16 : n-i)); 370 write_to_log(i==0, txt); 371 } 372 } 373 } 374 335 375 int cs_init_statistics(char *file) 336 376 {
Note:
See TracChangeset
for help on using the changeset viewer.