mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-08 07:21:58 +01:00
src: bdat fix
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
64056bdc73
commit
b2c372b0fe
@ -66,7 +66,7 @@ void process_bdat(struct smtp_session *session, char *readbuf, int readlen){
|
|||||||
|
|
||||||
if(readlen <= 0) return;
|
if(readlen <= 0) return;
|
||||||
|
|
||||||
if(session->bdat_rounds == 1){
|
if(session->bdat_rounds == 1 && session->fd == -1){
|
||||||
session->fd = open(session->ttmpfile, O_CREAT|O_RDWR, S_IRUSR|S_IWUSR|S_IRGRP);
|
session->fd = open(session->ttmpfile, O_CREAT|O_RDWR, S_IRUSR|S_IWUSR|S_IRGRP);
|
||||||
if(session->fd == -1){
|
if(session->fd == -1){
|
||||||
syslog(LOG_PRIORITY, "%s: %s", ERR_OPEN_TMP_FILE, session->ttmpfile);
|
syslog(LOG_PRIORITY, "%s: %s", ERR_OPEN_TMP_FILE, session->ttmpfile);
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
#include "piler-config.h"
|
#include "piler-config.h"
|
||||||
#include "params.h"
|
#include "params.h"
|
||||||
|
|
||||||
#define VERSION "1.3.0-epoll"
|
#define VERSION "1.3.1-epoll"
|
||||||
|
|
||||||
#define BUILD 979
|
#define BUILD 980
|
||||||
|
|
||||||
#define HOSTID "mailarchiver"
|
#define HOSTID "mailarchiver"
|
||||||
|
|
||||||
|
@ -118,6 +118,8 @@ void init_smtp_session(struct smtp_session *session, int slot, int sd, struct co
|
|||||||
session->net.ctx = NULL;
|
session->net.ctx = NULL;
|
||||||
session->net.ssl = NULL;
|
session->net.ssl = NULL;
|
||||||
|
|
||||||
|
session->fd = -1;
|
||||||
|
|
||||||
memset(session->buf, 0, SMALLBUFSIZE);
|
memset(session->buf, 0, SMALLBUFSIZE);
|
||||||
memset(session->remote_host, 0, INET6_ADDRSTRLEN);
|
memset(session->remote_host, 0, INET6_ADDRSTRLEN);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user