diff options
author | Dirk Meyer <dinoex@FreeBSD.org> | 2009-10-26 11:01:45 +0000 |
---|---|---|
committer | Dirk Meyer <dinoex@FreeBSD.org> | 2009-10-26 11:01:45 +0000 |
commit | cd831296266287287ec8eb0e3c9c6ab34250c23a (patch) | |
tree | b70230c0587b9914f142a009d948807a0b55bc5a | |
parent | 241f3878a0d75fda300835a9ca213184c2eb6aef (diff) | |
download | ports-cd831296266287287ec8eb0e3c9c6ab34250c23a.tar.gz ports-cd831296266287287ec8eb0e3c9c6ab34250c23a.zip |
Notes
-rw-r--r-- | mail/sendmail/Makefile | 2 | ||||
-rw-r--r-- | mail/sendmail/files/patch-worker.c | 75 |
2 files changed, 1 insertions, 76 deletions
diff --git a/mail/sendmail/Makefile b/mail/sendmail/Makefile index b3663868f6d7..7065d22295f2 100644 --- a/mail/sendmail/Makefile +++ b/mail/sendmail/Makefile @@ -169,7 +169,7 @@ SED_SCRIPT= -e "s;\`-pthread\';\`${PTHREAD_LIBS}\';" \ SED_SCRIPT+= -e "s;-DNIS ;;" .endif -post-extract: +post-patch: @${SED} -e "s=%%PREFIX%%=${PREFIX}=" ${FILESDIR}/sm-client.sh \ > ${WRKSRC}/sm-client.sh @${SED} -e "s=%%PREFIX%%=${PREFIX}=" ${FILESDIR}/sendmail.sh \ diff --git a/mail/sendmail/files/patch-worker.c b/mail/sendmail/files/patch-worker.c index 8852ca003f7d..9513292c5508 100644 --- a/mail/sendmail/files/patch-worker.c +++ b/mail/sendmail/files/patch-worker.c @@ -73,78 +73,3 @@ } TASKMGR_UNLOCK(); ---- libsharedmilter/worker.c.orig 2007-12-03 23:06:05.000000000 +0100 -+++ libsharedmilter/worker.c 2009-06-15 09:46:29.000000000 +0200 -@@ -328,6 +328,8 @@ - int dim_pfd = 0; - bool rebuild_set = true; - int pcnt = 0; /* error count for poll() failures */ -+ time_t lastcheck; -+ int nfd = 0; - - Tskmgr.tm_tid = sthread_get_id(); - if (pthread_detach(Tskmgr.tm_tid) != 0) -@@ -345,12 +347,12 @@ - } - dim_pfd = PFD_STEP; - -+ lastcheck = time(NULL); - for (;;) - { - SMFICTX_PTR ctx; -- int nfd, rfd, i; -+ int rfd, i; - time_t now; -- time_t lastcheck; - - POOL_LEV_DPRINTF(4, ("Let's %s again...", WAITFN)); - -@@ -364,20 +366,20 @@ - /* check for timed out sessions? */ - if (lastcheck + DT_CHECK_OLD_SESSIONS < now) - { -- SM_TAILQ_FOREACH(ctx, &WRK_CTX_HEAD, ctx_link) -+ ctx = SM_TAILQ_FIRST(&WRK_CTX_HEAD); -+ while (ctx != SM_TAILQ_END(&WRK_CTX_HEAD)) - { -+ SMFICTX_PTR ctx_nxt; -+ -+ ctx_nxt = SM_TAILQ_NEXT(ctx, ctx_link); - if (ctx->ctx_wstate == WKST_WAITING) - { - if (ctx->ctx_wait == 0) -- { - ctx->ctx_wait = now; -- continue; -- } -- -- /* if session timed out, close it */ -- if (ctx->ctx_wait + OLD_SESSION_TIMEOUT -- < now) -+ else if (ctx->ctx_wait + OLD_SESSION_TIMEOUT -+ < now) - { -+ /* if session timed out, close it */ - sfsistat (*fi_close) __P((SMFICTX *)); - - POOL_LEV_DPRINTF(4, -@@ -389,10 +391,9 @@ - (void) (*fi_close)(ctx); - - mi_close_session(ctx); -- ctx = SM_TAILQ_FIRST(&WRK_CTX_HEAD); -- continue; - } - } -+ ctx = ctx_nxt; - } - lastcheck = now; - } -@@ -465,6 +466,7 @@ - } - } - } -+ rebuild_set = false; - } - - TASKMGR_UNLOCK(); |