Ignore:
Timestamp:
Apr 20, 2010, 4:35:26 PM (15 years ago)
Author:
Silvan Scherrer
Message:

samba client 1.6: added all remaining 1.5 changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/client-1.6/src/smbwrp.c

    r401 r441  
    2020
    2121#include "includes.h"
    22 
    2322#include "smbwrp.h"
    2423
     24void smbwrp_Logging()
     25{
     26        char slogfile[_MAX_PATH +1] = {0};
     27        char slogfilename[] = "log.smbc";
     28        char *env = getenv("LOGFILES");
     29                if (env != NULL)
     30                {
     31                   strncpy(slogfile, env, sizeof(slogfile) -1);
     32                   strncat(slogfile, "\\", sizeof(slogfile) - strlen(slogfile) -1);
     33                   strncat(slogfile, slogfilename, sizeof(slogfile) - strlen(slogfile) -1);
     34                }
     35                else
     36                {
     37                   strncpy(slogfile, slogfilename, sizeof(slogfile) -1);
     38                }
     39
     40                // init samba for debug messages
     41                setup_logging(slogfile, false);
     42                lp_set_logfile(slogfile);
     43                debug_parse_levels("10");
     44
     45}
    2546
    2647static int
     
    144165                return 1;
    145166        }
     167
     168        if (writeLog())
     169        {
     170                smbwrp_Logging();
     171        }
    146172
    147173/*
Note: See TracChangeset for help on using the changeset viewer.