FreeBSD Bugzilla – Attachment 97545 Details for
Bug 136304
[maintainer] mail/dma - fix message corruption
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
dma-lock-delivery.diff
dma-lock-delivery.diff (text/plain), 1.58 KB, created by
Daniel Roethlisberger
on 2009-07-03 23:40:05 UTC
(
hide
)
Description:
dma-lock-delivery.diff
Filename:
MIME Type:
Creator:
Daniel Roethlisberger
Created:
2009-07-03 23:40:05 UTC
Size:
1.58 KB
patch
obsolete
>diff -ruN dma.orig/Makefile dma/Makefile >--- dma.orig/Makefile 2009-02-13 21:19:04.000000000 +0100 >+++ dma/Makefile 2009-07-03 21:58:59.000000000 +0200 >@@ -7,7 +7,7 @@ > > PORTNAME= dma > PORTVERSION= 20090208 >-PORTREVISION= 1 >+PORTREVISION= 2 > CATEGORIES= mail ipv6 > MASTER_SITES= http://mirror.roe.ch/dist/dma/ > >diff -ruN dma.orig/files/patch-libexec_dma_dma.c dma/files/patch-libexec_dma_dma.c >--- dma.orig/files/patch-libexec_dma_dma.c 1970-01-01 01:00:00.000000000 +0100 >+++ dma/files/patch-libexec_dma_dma.c 2009-07-04 00:13:15.000000000 +0200 >@@ -0,0 +1,38 @@ >+--- libexec/dma/dma.c.orig 2009-02-09 01:36:50.000000000 +0100 >++++ libexec/dma/dma.c 2009-07-04 00:12:53.000000000 +0200 >+@@ -612,6 +612,7 @@ >+ const char *errmsg = "unknown bounce reason"; >+ struct timeval now; >+ struct stat st; >++ struct flock fl; >+ >+ syslog(LOG_INFO, "%s: mail from=<%s> to=<%s>", >+ it->queueid, it->sender, it->addr); >+@@ -620,11 +621,27 @@ >+ syslog(LOG_INFO, "%s: trying delivery", >+ it->queueid); >+ >++ bzero(&fl, sizeof(fl)); >++ fl.l_type = F_WRLCK; >++ fl.l_whence = SEEK_SET; >++ if (fcntl(fileno(it->queuef), F_SETLKW, &fl) == -1) { >++ syslog(LOG_ERR, "%s: failed to lock queue file: %m", >++ it->queueid); >++ } >++ >+ if (it->remote) >+ error = deliver_remote(it, &errmsg); >+ else >+ error = deliver_local(it, &errmsg); >+ >++ bzero(&fl, sizeof(fl)); >++ fl.l_type = F_UNLCK; >++ fl.l_whence = SEEK_SET; >++ if (fcntl(fileno(it->queuef), F_SETLKW, &fl) == -1) { >++ syslog(LOG_ERR, "%s: failed to unlock queue file: %m", >++ it->queueid); >++ } >++ >+ switch (error) { >+ case 0: >+ unlink(it->queuefn);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 136304
: 97545