Changeset 48
- Timestamp:
- Aug 2, 2007, 11:22:20 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/samba/source/ndpsmb/ndpsmb.c
r39 r48 1 //YD enable following line to get logging to disk2 #define DEBUG3 1 #define NDPL_LARGEFILES 4 2 #define INCL_LONGLONG … … 6 4 #include <smbwrp.h> 7 5 #include <smbcd.h> 6 #include <stdio.h> 7 #include <stdlib.h> 8 #include <stdarg.h> 9 #include <time.h> 10 8 11 9 12 #define NULL ((void *)0) 10 13 11 #include <mydebug.h> 14 void log(const char *fmt, ...) 15 { 16 char *ndpsmb_debug = getenv("NDPSMB_DEBUG"); 17 18 if (ndpsmb_debug != NULL) 19 { 20 FILE * logfile = NULL; 21 va_list args; 22 time_t t = time(NULL); 23 char timebuf[80] = {0}; 24 strftime(timebuf,sizeof(timebuf)-1,"%Y/%m/%d %H:%M:%S", localtime(&t)); 25 logfile = fopen("smblog","a"); 26 if (logfile == NULL) 27 { 28 DosBeep(400,400); 29 } 30 else 31 { 32 fprintf(logfile, "%s: (%02d) ", timebuf, _gettid()); 33 va_start(args, fmt); 34 vfprintf(logfile, fmt, args); 35 va_end(args); 36 fclose(logfile); 37 } 38 } 39 } 12 40 13 41 int StrLen(char * s)
Note:
See TracChangeset
for help on using the changeset viewer.