* smbfs.c (smbfs_set_debugf): New function to specify logfile.
* smbfs.h: Declare smbfs_set_debugf().
Этот коммит содержится в:
родитель
e7cf7313f8
Коммит
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>
|
2002-09-12 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
* mcserv.c: Declare crypt if crypt.h is missing and we are not
|
* 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
|
License along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
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 <config.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@ -250,9 +250,25 @@ bucket_set_authinfo (smbfs_connection *bucket,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
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 ******************************/
|
/********************** The callbacks ******************************/
|
||||||
@ -263,7 +279,6 @@ smbfs_init (vfs * me)
|
|||||||
|
|
||||||
/* DEBUGLEVEL = 4; */
|
/* DEBUGLEVEL = 4; */
|
||||||
|
|
||||||
setup_logging ("mc", True);
|
|
||||||
TimeInit ();
|
TimeInit ();
|
||||||
charset_initialise ();
|
charset_initialise ();
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user