Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Mar 29 07:03:58 CEST 2011 on sn-devel-104
void debug_set_logfile(const char *name)
{
+ if (name == NULL || *name == 0) {
+ /* this copes with calls when smb.conf is not loaded yet */
+ return;
+ }
TALLOC_FREE(state.debugf);
state.debugf = talloc_strdup(NULL, name);
}
if (new_fd == -1) {
log_overflow = true;
- DEBUG(0, ("Unable to open new log file %s: %s\n", state.debugf, strerror(errno)));
+ DEBUG(0, ("Unable to open new log file '%s': %s\n", state.debugf, strerror(errno)));
log_overflow = false;
ret = false;
} else {