mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 17:30:12 +01:00
move email fix
Change-Id: Ie9754cae0d08c6717069cff2d6c93443f5e48066 Signed-off-by: SJ <sj@acts.hu>
This commit is contained in:
parent
cf1d7bdf45
commit
d314a606b2
@ -666,7 +666,7 @@ int can_i_write_current_directory(){
|
|||||||
void move_email(struct smtp_session *session){
|
void move_email(struct smtp_session *session){
|
||||||
char buf[SMALLBUFSIZE];
|
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)){
|
if(rename(session->ttmpfile, buf)){
|
||||||
syslog(LOG_PRIORITY, "ERROR: couldn't rename %s to %s", session->ttmpfile, buf);
|
syslog(LOG_PRIORITY, "ERROR: couldn't rename %s to %s", session->ttmpfile, buf);
|
||||||
|
@ -89,8 +89,6 @@ void process_data(struct smtp_session *session, char *readbuf, int readlen){
|
|||||||
pos = searchStringInBuffer(&puf[0], len, SMTP_CMD_PERIOD, 5);
|
pos = searchStringInBuffer(&puf[0], len, SMTP_CMD_PERIOD, 5);
|
||||||
|
|
||||||
if(pos > 0){
|
if(pos > 0){
|
||||||
//write(session->fd, puf, pos+2);
|
|
||||||
//session->tot_len += pos+2;
|
|
||||||
write(session->fd, puf, pos);
|
write(session->fd, puf, pos);
|
||||||
session->tot_len += pos;
|
session->tot_len += pos;
|
||||||
process_command_period(session);
|
process_command_period(session);
|
||||||
|
Loading…
Reference in New Issue
Block a user