Skip to content
Snippets Groups Projects
Commit 3defb8f8 authored by rswindell's avatar rswindell
Browse files

Added protocol to spamlog() prototype.

parent aba2af15
No related branches found
No related tags found
No related merge requests found
...@@ -66,7 +66,7 @@ extern "C" BOOL DLLCALL hacklog(scfg_t* cfg, char* prot, char* user, char* text, ...@@ -66,7 +66,7 @@ extern "C" BOOL DLLCALL hacklog(scfg_t* cfg, char* prot, char* user, char* text,
return(TRUE); return(TRUE);
} }
extern "C" BOOL DLLCALL spamlog(scfg_t* cfg, char* reason, char* host, char* ip_addr) extern "C" BOOL DLLCALL spamlog(scfg_t* cfg, char* prot, char* reason, char* host, char* ip_addr)
{ {
char hdr[512]; char hdr[512];
char fname[MAX_PATH+1]; char fname[MAX_PATH+1];
...@@ -78,7 +78,8 @@ extern "C" BOOL DLLCALL spamlog(scfg_t* cfg, char* reason, char* host, char* ip_ ...@@ -78,7 +78,8 @@ extern "C" BOOL DLLCALL spamlog(scfg_t* cfg, char* reason, char* host, char* ip_
if((file=sopen(fname,O_CREAT|O_WRONLY|O_BINARY|O_APPEND,SH_DENYWR))==-1) if((file=sopen(fname,O_CREAT|O_WRONLY|O_BINARY|O_APPEND,SH_DENYWR))==-1)
return(FALSE); return(FALSE);
sprintf(hdr,"SUSPECTED SPAM REJECTED on %.24s\r\nFrom: %s [%s]\r\nReason: " sprintf(hdr,"SUSPECTED %s SPAM REJECTED on %.24s\r\nFrom: %s [%s]\r\nReason: "
,prot
,ctime(&now) ,ctime(&now)
,host ,host
,ip_addr ,ip_addr
......
...@@ -784,9 +784,10 @@ extern "C" { ...@@ -784,9 +784,10 @@ extern "C" {
DLLEXPORT char * DLLCALL hhmmtostr(scfg_t* cfg, struct tm* tm, char* str); DLLEXPORT char * DLLCALL hhmmtostr(scfg_t* cfg, struct tm* tm, char* str);
/* logfile.cpp */ /* logfile.cpp */
DLLEXPORT BOOL DLLCALL hacklog(scfg_t* cfg, char* prot, char* user, char* text, DLLEXPORT BOOL DLLCALL hacklog(scfg_t* cfg, char* prot, char* user, char* text
char* host, SOCKADDR_IN* addr); ,char* host, SOCKADDR_IN* addr);
DLLEXPORT BOOL DLLCALL spamlog(scfg_t* cfg, char* reason, char* host, char* ip_addr); DLLEXPORT BOOL DLLCALL spamlog(scfg_t* cfg, char* prot, char* reason
,char* host, char* ip_addr);
DLLEXPORT char * DLLCALL remove_ctrl_a(char* instr, char* outstr); DLLEXPORT char * DLLCALL remove_ctrl_a(char* instr, char* outstr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment