Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (6505b9544764ad6e062d50603552bb519ca5de8a)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Vlad Glagolev <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (6505b9544764ad6e062d50603552bb519ca5de8a)
  • Date: Tue, 12 Aug 2014 11:39:06 -0500

GIT changes to master grimoire by Vlad Glagolev <stealth AT sourcemage.org>:

mail/greylist/CONFIGURE | 1 +
mail/greylist/HISTORY | 5 +++++
mail/greylist/PRE_BUILD | 5 +++++
mail/greylist/timeout.patch | 44
++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 55 insertions(+)

New commits:
commit 6505b9544764ad6e062d50603552bb519ca5de8a
Author: Vlad Glagolev <stealth AT sourcemage.org>
Commit: Vlad Glagolev <stealth AT sourcemage.org>

greylist: added ability to show configured timeout value in defer message

diff --git a/mail/greylist/CONFIGURE b/mail/greylist/CONFIGURE
new file mode 100755
index 0000000..9ca641a
--- /dev/null
+++ b/mail/greylist/CONFIGURE
@@ -0,0 +1 @@
+config_query GREYLIST_TIMEOUT "Display configured timeout value in defer
message?" n
diff --git a/mail/greylist/HISTORY b/mail/greylist/HISTORY
index 0388899..1c22c6e 100644
--- a/mail/greylist/HISTORY
+++ b/mail/greylist/HISTORY
@@ -1,3 +1,8 @@
+2014-08-12 Vlad Glagolev <stealth AT sourcemage.org>
+ * CONFIGURE: added, to configure timeout patch applying
+ * PRE_BUILD: apply patch
+ * timeout.patch: added, to show configured timeout value
+
2013-06-26 Vlad Glagolev <stealth AT sourcemage.org>
* DETAILS: PATCHLEVEL=1
* PRE_BUILD: apply patch
diff --git a/mail/greylist/PRE_BUILD b/mail/greylist/PRE_BUILD
index 458066b..d79af79 100755
--- a/mail/greylist/PRE_BUILD
+++ b/mail/greylist/PRE_BUILD
@@ -10,6 +10,11 @@ patch -p0 < "$SPELL_DIRECTORY/dbi.patch" &&
# fix build with new Boost >= 1.49
patch -p0 < "$SPELL_DIRECTORY/boost-149.patch" &&

+# optional: display threshold in timeout defer message
+if [[ $GREYLIST_TIMEOUT == y ]]; then
+ patch -p0 < "$SPELL_DIRECTORY/timeout.patch"
+fi &&
+
# fix collecting triplets (timeout=0)
patch -p0 < "$SPELL_DIRECTORY/collect.patch" &&

diff --git a/mail/greylist/timeout.patch b/mail/greylist/timeout.patch
new file mode 100644
index 0000000..ff6918a
--- /dev/null
+++ b/mail/greylist/timeout.patch
@@ -0,0 +1,44 @@
+--- src/greylist.h.orig 2010-09-07 01:55:58.000000000 +0400
++++ src/greylist.h 2014-08-12 20:02:35.947227577 +0400
+@@ -30,6 +30,8 @@
+ Greylist(boost::shared_ptr<DataSource> ds, ModeType m, bool v, unsigned
t, unsigned w)
+ : _ds(ds), _mode(m), _verbose(v), _timeout(t), _weakbytes(w) { }
+ Core::ActionType decide(Triplet& triplet, Core::Extra& extra) {
++ extra.setTimeOut(_timeout);
++
+ unsigned long long id;
+ unsigned long count, uts;
+ if (!findTriplet(triplet, id, count, uts)) {
+--- src/core.h.orig 2010-09-07 01:55:58.000000000 +0400
++++ src/core.h 2014-08-12 20:01:51.536118878 +0400
+@@ -33,7 +33,7 @@
+ public:
+ class Extra {
+ std::string _comment, _prefix;
+- unsigned long _diff, _count;
++ unsigned long _diff, _count, _timeout;
+ public:
+ Extra() : _comment(), _prefix(), _diff(0), _count(0) { }
+ void setComment(const std::string& c) { _comment = c; }
+@@ -42,6 +42,10 @@
+ const std::string& getPrefix() const { return _prefix; }
+ unsigned long getDiff() const { return _diff; }
+ unsigned long getCount() const { return _count; }
++ unsigned long getTimeOut() const { return _timeout; }
++ void setTimeOut(unsigned long t) {
++ _timeout = t;
++ }
+ void set(const std::string & p, unsigned long c, unsigned long t) {
+ _prefix = p;
+ _count = c;
+--- src/action.h.orig 2010-09-07 01:55:58.000000000 +0400
++++ src/action.h 2014-08-12 20:03:20.548341018 +0400
+@@ -70,7 +70,7 @@
+ if (_deferwithstatus && ((*_deferMap.find(action)).second == true)) {
+ std::stringstream stm;
+ stm << extra.getPrefix() << ": (" << extra.getCount() << ", "
+- << extra.getDiff() << " secs)";
++ << extra.getDiff() << "/" << extra.getTimeOut() << " secs)";
+ str += " " + stm.str();
+ }
+ str += "\n\n";



  • [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (6505b9544764ad6e062d50603552bb519ca5de8a), Vlad Glagolev, 08/12/2014

Archive powered by MHonArc 2.6.24.

Top of Page