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/sendlist.c

    r773 r1328  
    3434            v 1.9.4  2000/08/18 - 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> 
     
    7878        ** big 
    7979        */ 
    80         syslog(BBFTPD_ERR,"Message to big in sendlist (%d,%d)",msglen,MAXMESSLEN) ; 
     80        bbftpd_log(BBFTPD_ERR,"Message to big in sendlist (%d,%d)",msglen,MAXMESSLEN) ; 
    8181        reply(MSG_BAD_NO_RETRY,"String too long") ; 
    8282        return -1 ; 
     
    9696    receive_buffer[msglen] = '\0' ; 
    9797    if ( code == MSG_LIST ) { 
    98         syslog(BBFTPD_DEBUG,"Getting file list %s",receive_buffer) ; 
     98        bbftpd_log(BBFTPD_DEBUG,"Getting file list %s",receive_buffer) ; 
    9999    } 
    100100    /* 
     
    111111            msg->msglen = 0 ; 
    112112            if ( writemessage(msgsock,send_buffer,MINMESSLEN,recvcontrolto) < 0 ) { 
    113                 syslog(BBFTPD_ERR,"Error sending LISTREPL part 1") ; 
     113                bbftpd_log(BBFTPD_ERR,"Error sending LISTREPL part 1") ; 
    114114                return -1 ; 
    115115            } 
     
    139139#endif 
    140140        if ( writemessage(msgsock,send_buffer,MINMESSLEN,recvcontrolto) < 0 ) { 
    141             syslog(BBFTPD_ERR,"Error sending LISTREPL part 1") ; 
     141            bbftpd_log(BBFTPD_ERR,"Error sending LISTREPL part 1") ; 
    142142            return -1 ; 
    143143        } 
     
    148148            tmpfile = pg.gl_pathv[i] ; 
    149149            if ( writemessage(msgsock,tmpfile,strlen(tmpfile)+1,recvcontrolto) < 0 ) { 
    150                 syslog(BBFTPD_ERR,"Error sending LISTREPL filename %s",tmpfile) ; 
     150                bbftpd_log(BBFTPD_ERR,"Error sending LISTREPL filename %s",tmpfile) ; 
    151151                return -1 ; 
    152152            } 
Note: See TracChangeset for help on using the changeset viewer.