move email fix

Change-Id: Ie9754cae0d08c6717069cff2d6c93443f5e48066
Signed-off-by: SJ <sj@acts.hu>
This commit is contained in:
SJ 2016-10-28 22:37:12 +02:00
parent cf1d7bdf45
commit d314a606b2
2 changed files with 1 additions and 3 deletions

View File

@ -666,7 +666,7 @@ int can_i_write_current_directory(){
void move_email(struct smtp_session *session){
char buf[SMALLBUFSIZE];
snprintf(buf, sizeof(buf)-1, "%d/%s", session->ttmpfile[RND_STR_LEN-1] % session->cfg->number_of_worker_processes, session->ttmpfile);
snprintf(buf, sizeof(buf)-1, "%d/%s", session->ttmpfile[0] % session->cfg->number_of_worker_processes, session->ttmpfile);
if(rename(session->ttmpfile, buf)){
syslog(LOG_PRIORITY, "ERROR: couldn't rename %s to %s", session->ttmpfile, buf);

View File

@ -89,8 +89,6 @@ void process_data(struct smtp_session *session, char *readbuf, int readlen){
pos = searchStringInBuffer(&puf[0], len, SMTP_CMD_PERIOD, 5);
if(pos > 0){
//write(session->fd, puf, pos+2);
//session->tot_len += pos+2;
write(session->fd, puf, pos);
session->tot_len += pos;
process_command_period(session);