Ignore:
Timestamp:
Apr 13, 2010, 6:45:35 PM (15 years ago)
Author:
Silvan Scherrer
Message:

client 1.5: samba logging part1

Location:
branches/client-1.5/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/client-1.5/src/debug.c

    r189 r434  
    6464                   strncpy(logfile, env, sizeof(logfile) -1);
    6565                   strncat(logfile, "\\", sizeof(logfile) - strlen(logfile) -1);
    66                    strncat(logfile, logfilename, sizeof(logfile) - strlen(logfile) -1); 
     66                   strncat(logfile, logfilename, sizeof(logfile) - strlen(logfile) -1);
    6767                }
    6868                else
     
    7070                   strncpy(logfile, logfilename, sizeof(logfile) -1);
    7171                }
     72                // set the samba logging stuff
     73                smbwrp_Logging();
    7274        } /* endif */
    7375
  • branches/client-1.5/src/smbwrp.c

    r189 r434  
    2323#include "smbwrp.h"
    2424
     25#include "includes.h"
     26
     27void smbwrp_Logging()
     28{
     29        char slogfile[_MAX_PATH +1] = {0};
     30        char slogfilename[] = "samba.log";
     31        char *env = getenv("LOGFILES");
     32                if (env != NULL)
     33                {
     34                   strncpy(slogfile, env, sizeof(slogfile) -1);
     35                   strncat(slogfile, "\\", sizeof(slogfile) - strlen(slogfile) -1);
     36                   strncat(slogfile, slogfilename, sizeof(slogfile) - strlen(slogfile) -1);
     37                }
     38                else
     39                {
     40                   strncpy(slogfile, slogfilename, sizeof(slogfile) -1);
     41                }
     42
     43                // init samba for debug messages
     44                debug_init();
     45                setup_logging(slogfile, false);
     46                debug_parse_levels("9");
     47}
    2548
    2649static int
Note: See TracChangeset for help on using the changeset viewer.