mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-22 03:02:06 +03:00
* smbfs.c (smbfs_set_debugf): New function to specify logfile.
* smbfs.h: Declare smbfs_set_debugf().
This commit is contained in:
parent
e7cf7313f8
commit
6a6fb355df
@ -1,3 +1,9 @@
|
||||
2002-09-13 Andrew V. Samoilov <sav@bcs.zp.ua>
|
||||
|
||||
* smbfs.c (smbfs_set_debugf): New function to specify
|
||||
logfile.
|
||||
* smbfs.h: Declare smbfs_set_debugf().
|
||||
|
||||
2002-09-12 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* mcserv.c: Declare crypt if crypt.h is missing and we are not
|
||||
|
23
vfs/smbfs.c
23
vfs/smbfs.c
@ -20,7 +20,7 @@
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Namespace: exports vfs_smbfs_ops, smbfs_set_debug */
|
||||
/* Namespace: exports vfs_smbfs_ops, smbfs_set_debug(), smbfs_set_debugf() */
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
@ -250,9 +250,25 @@ bucket_set_authinfo (smbfs_connection *bucket,
|
||||
}
|
||||
|
||||
void
|
||||
smbfs_set_debug(int arg)
|
||||
smbfs_set_debug (int arg)
|
||||
{
|
||||
DEBUGLEVEL = arg;
|
||||
DEBUGLEVEL = arg;
|
||||
}
|
||||
|
||||
void
|
||||
smbfs_set_debugf (const char *filename)
|
||||
{
|
||||
extern pstring debugf;
|
||||
extern FILE *dbf;
|
||||
if (DEBUGLEVEL > 0) {
|
||||
FILE *outfile = fopen (filename, "w");
|
||||
if (outfile) {
|
||||
setup_logging ("", True); /* No needs for timestamp for each message */
|
||||
dbf = outfile;
|
||||
setbuf (dbf, NULL);
|
||||
pstrcpy (debugf, filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/********************** The callbacks ******************************/
|
||||
@ -263,7 +279,6 @@ smbfs_init (vfs * me)
|
||||
|
||||
/* DEBUGLEVEL = 4; */
|
||||
|
||||
setup_logging ("mc", True);
|
||||
TimeInit ();
|
||||
charset_initialise ();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user