pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mail/policyd Solaris/SunPro fixes.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/cf178088824a
branches:  trunk
changeset: 539303:cf178088824a
user:      sketch <sketch%pkgsrc.org@localhost>
date:      Mon Mar 03 11:45:17 2008 +0000

description:
Solaris/SunPro fixes.

diffstat:

 mail/policyd/distinfo         |   7 +++++--
 mail/policyd/patches/patch-ab |  16 ++++++++++++----
 mail/policyd/patches/patch-ac |  13 +++++++++++++
 mail/policyd/patches/patch-ad |  37 +++++++++++++++++++++++++++++++++++++
 mail/policyd/patches/patch-ae |  31 +++++++++++++++++++++++++++++++
 5 files changed, 98 insertions(+), 6 deletions(-)

diffs (137 lines):

diff -r bead6b50861f -r cf178088824a mail/policyd/distinfo
--- a/mail/policyd/distinfo     Mon Mar 03 05:51:07 2008 +0000
+++ b/mail/policyd/distinfo     Mon Mar 03 11:45:17 2008 +0000
@@ -1,7 +1,10 @@
-$NetBSD: distinfo,v 1.2 2007/08/20 07:30:09 ghen Exp $
+$NetBSD: distinfo,v 1.3 2008/03/03 11:45:17 sketch Exp $
 
 SHA1 (policyd-1.82.tar.gz) = 4a9bf4bcf63eb3792794d87682e67b15e4a04707
 RMD160 (policyd-1.82.tar.gz) = 0258ee9abaa00cde9a139bdeafed36df1ec37537
 Size (policyd-1.82.tar.gz) = 68372 bytes
 SHA1 (patch-aa) = f1be4bf5f101e15d8f73b05a73fdd1ca324b72eb
-SHA1 (patch-ab) = 9ef169a450d316c5f9f6b863fa5d618c77636738
+SHA1 (patch-ab) = 3bc5c7270a4c96b694c03bbb30722e1146a21170
+SHA1 (patch-ac) = b8e254e0c05a5e5ea599a068b9b63a2fd030b5b1
+SHA1 (patch-ad) = b0db714c2379deb225774ed4c237ea8ad0e52916
+SHA1 (patch-ae) = 8a9db8b9e050f2692c4a9201a1319248a9f30db6
diff -r bead6b50861f -r cf178088824a mail/policyd/patches/patch-ab
--- a/mail/policyd/patches/patch-ab     Mon Mar 03 05:51:07 2008 +0000
+++ b/mail/policyd/patches/patch-ab     Mon Mar 03 11:45:17 2008 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-ab,v 1.1.1.1 2007/08/07 12:34:56 ghen Exp $
+$NetBSD: patch-ab,v 1.2 2008/03/03 11:45:17 sketch Exp $
 
---- Makefile.orig      2007-07-11 09:06:23.000000000 +0200
-+++ Makefile
-@@ -14,6 +14,8 @@ lib += -L/usr/pkg/lib/mysql
+--- Makefile.orig      2007-08-20 07:42:05.000000000 +0100
++++ Makefile   2008-03-03 11:05:32.976857000 +0000
+@@ -14,6 +14,8 @@
  # os x
  lib += -L/usr/local/mysql
  
@@ -11,3 +11,11 @@
  
  CC       := gcc
  CPPFLAGS := -O $(inc)
+@@ -23,6 +25,7 @@
+ 
+ ifeq "${OS_NAME}" "sunos"
+ LDLIBS   += -lsocket -lnsl -lm
++CPPFLAGS += -DMSG_NOSIGNAL=0
+ endif
+ 
+ .c.o:
diff -r bead6b50861f -r cf178088824a mail/policyd/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/policyd/patches/patch-ac     Mon Mar 03 11:45:17 2008 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.1 2008/03/03 11:45:17 sketch Exp $
+
+--- sockets.c.orig     2007-08-20 07:42:05.000000000 +0100
++++ sockets.c  2008-03-03 11:05:33.815255000 +0000
+@@ -177,7 +177,7 @@
+       if (strncmp(ptr + buf_counter[fd] - 2, "\n\n", 2) == 0)
+       {
+       if (DEBUG > 2)
+-          logmessage("DEBUG: fd %d: %s: returning -2 after reading %d bytes\n",fd, __FUNCTION__, data_read);
++          logmessage("DEBUG: fd %d: %s: returning -2 after reading %d bytes\n",fd, __func__, data_read);
+       
+         return -2;
+       }       
diff -r bead6b50861f -r cf178088824a mail/policyd/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/policyd/patches/patch-ad     Mon Mar 03 11:45:17 2008 +0000
@@ -0,0 +1,37 @@
+$NetBSD: patch-ad,v 1.1 2008/03/03 11:45:17 sketch Exp $
+
+--- throttle.c.orig    2008-03-03 11:09:11.691752000 +0000
++++ throttle.c 2008-03-03 11:26:23.792297000 +0000
+@@ -155,19 +155,21 @@
+     logmessage("DEBUG: fd: %d: tresult: %d\n", fd, tresult);
+ 
+   /* percentage won, set attribute accordingly */
+-  switch (tresult)
+-  {
+-    
+-    case 0 ... 49:      tattrib_array[fd][0] = 'a'; break;
+-    case 50 ... 89:     tattrib_array[fd][0] = 'w'; break;
+-    case 90 ... 900000: tattrib_array[fd][0] = 'p'; break;
+-    /* allow for big percentage overshoot */
++  if (tresult >= 0 && tresult <= 49)
++    tattrib_array[fd][0] = 'a';
+ 
+-    default:
+-      logmessage("fatal: throttle_check(): invalid tresult: %d\n", tresult);
+-      return (-1);
+-  }
++  else if (tresult >= 50 && tresult <= 89)
++    tattrib_array[fd][0] = 'w';
+ 
++  /* allow for big percentage overshoot */
++  else if (tresult >= 90 && tresult <= 900000)
++    tattrib_array[fd][0] = 'p';
++
++  else {
++    logmessage("fatal: throttle_check(): invalid tresult: %d\n", tresult);
++    return (-1);
++  }
++  
+   /* we selectively choose which throttle module we want */
+   switch(tnum)
+   {
diff -r bead6b50861f -r cf178088824a mail/policyd/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/policyd/patches/patch-ae     Mon Mar 03 11:45:17 2008 +0000
@@ -0,0 +1,31 @@
+$NetBSD: patch-ae,v 1.1 2008/03/03 11:45:17 sketch Exp $
+
+--- throttle_rcpt.c.orig       2007-08-20 07:42:05.000000000 +0100
++++ throttle_rcpt.c    2008-03-03 11:40:14.424059000 +0000
+@@ -61,15 +61,18 @@
+   trcpt[fd] = atof(mysqlchar_array[fd][2]) / atof(mysqlchar_array[fd][1]) * 100;
+ 
+   /* percentage won, set attribute accordingly */
+-  switch (trcpt[fd])
+-  {
+-    case 0 ... 49:    tattrib_array[fd][0] = 'a'; break;
+-    case 50 ... 89:   tattrib_array[fd][0] = 'w'; break;
+-    case 90 ... 1000: tattrib_array[fd][0] = 'p'; break;
++  if (trcpt[fd] >= 0 && trcpt[fd] <= 49)
++    tattrib_array[fd][0] = 'a';
+ 
+-    default:
+-      logmessage("fatal: throttle_rcpt(): invalid tresult: %d\n", trcpt[fd]);
+-  }
++  else if (trcpt[fd] >= 50 && trcpt[fd] <= 89)
++    tattrib_array[fd][0] = 'w';
++
++  /* allow for big percentage overshoot */
++  else if (trcpt[fd] >= 90 && trcpt[fd] <= 1000)
++    tattrib_array[fd][0] = 'p';
++
++  else
++    logmessage("fatal: throttle_rcpt(): invalid tresult: %d\n", trcpt[fd]);
+   
+   /* user is not in the database */
+   if(strlen(mysqlchar_array[fd][0]) < 2)



Home | Main Index | Thread Index | Old Index