Ignore:
Timestamp:
26/07/06 11:18:55 (13 years ago)
Author:
spascoe
Message:

I've created a bbftpd log facility to replace syslog.
At present it allows you to log messages to a file in addition
to syslog. This should help testing on other machines.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/trunk/src/bbftp-server-3.2.0/bbftpd/changetodir.c

    r773 r1328  
    3434                                    - Correct typo 
    3535               v 2.0.1  2001/04/23  - Correct indentation 
    36                v 2.1.0  2001/05/30  - Correct syslog level 
     36               v 2.1.0  2001/05/30  - Correct bbftpd_log level 
    3737                                       
    3838 *****************************************************************************/ 
     
    4242#include <netinet/in.h> 
    4343#include <stdio.h> 
    44 #include <syslog.h> 
     44#include <bbftpd_log.h> 
    4545#include <sys/stat.h> 
    4646#include <sys/types.h> 
     
    7070        ** big 
    7171        */ 
    72         syslog(BBFTPD_ERR,"Message to big in changetodir (%d,%d)",msglen,MAXMESSLEN) ; 
     72        bbftpd_log(BBFTPD_ERR,"Message to big in changetodir (%d,%d)",msglen,MAXMESSLEN) ; 
    7373        reply(MSG_BAD_NO_RETRY,"Directory too long") ; 
    7474        return -1 ; 
     
    8888    receive_buffer[msglen] = '\0' ; 
    8989    if ( code == MSG_CHDIR ) { 
    90         syslog(BBFTPD_DEBUG,"Changing directory to %s",receive_buffer) ; 
     90        bbftpd_log(BBFTPD_DEBUG,"Changing directory to %s",receive_buffer) ; 
    9191    } 
    9292    /* 
     
    100100        savederrno = errno ; 
    101101        sprintf(logmessage,"Error changing directory %s : %s ",receive_buffer,strerror(errno)) ; 
    102         syslog(BBFTPD_ERR,"Error changing directory %s : %s",receive_buffer,strerror(errno)) ; 
     102        bbftpd_log(BBFTPD_ERR,"Error changing directory %s : %s",receive_buffer,strerror(errno)) ; 
    103103        /* 
    104104        ** We tell the client not to retry in the following case (even in waiting 
Note: See TracChangeset for help on using the changeset viewer.