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

    r773 r1328  
    4141#include <sys/socket.h> 
    4242#include <netinet/in.h> 
    43 #include <syslog.h> 
     43#include <bbftpd_log.h> 
    4444#if TIME_WITH_SYS_TIME 
    4545# include <sys/time.h> 
     
    7979    */ 
    8080    if ( (myrsa = RSA_generate_key(NBITSINKEY,3,NULL,NULL)) == NULL) { 
    81         syslog(BBFTPD_ERR,"%s",ERR_error_string(ERR_get_error(),NULL) ) ; 
     81        bbftpd_log(BBFTPD_ERR,"%s",ERR_error_string(ERR_get_error(),NULL) ) ; 
    8282        exit(1) ; 
    8383    } 
     
    9595#endif 
    9696    if (writemessage(outcontrolsock,buf,MINMESSLEN,sendcontrolto) < 0 ) { 
    97         syslog(BBFTPD_ERR,"Error on sendcrypt 1") ; 
     97        bbftpd_log(BBFTPD_ERR,"Error on sendcrypt 1") ; 
    9898        exit(1) ; 
    9999    } 
     
    108108#endif 
    109109    if (writemessage(outcontrolsock,buf,CRYPTMESSLEN,sendcontrolto) < 0 ) { 
    110         syslog(BBFTPD_ERR,"Error on sendcrypt 2") ; 
     110        bbftpd_log(BBFTPD_ERR,"Error on sendcrypt 2") ; 
    111111        exit(1) ; 
    112112    } 
     
    115115    */ 
    116116    if (writemessage(outcontrolsock,pubkey,lenkey,sendcontrolto) < 0 ) { 
    117         syslog(BBFTPD_ERR,"Error on sendcrypt pubkey") ; 
     117        bbftpd_log(BBFTPD_ERR,"Error on sendcrypt pubkey") ; 
    118118        exit(1) ; 
    119119    } 
    120120    if (writemessage(outcontrolsock,pubexponent,lenexpo,sendcontrolto) < 0 ) { 
    121         syslog(BBFTPD_ERR,"Error on sendcrypt pubexponent") ; 
     121        bbftpd_log(BBFTPD_ERR,"Error on sendcrypt pubexponent") ; 
    122122        exit(1) ; 
    123123    } 
Note: See TracChangeset for help on using the changeset viewer.