ports/mail/vpopmail/files/patch-vpgsql.c
Peter Pentchev 215d42df82 Update to vpopmail-5.4.17. In the process:
- add a new knob, WITH_SQL_REMOVE_DELETED, for explicitly activating
  the new code for removing entries from the SQL log file when a user or
  domain is deleted;
- add real NOPORTDOCS support and install the README.* files in addition
  to the doc_html/ and man_html/ directories if NOPORTDOCS is not set;
- fix a couple of spelling and grammar errors in the new README.vpopmaild;
- add several sanity checks;
- remove the last traces of the ActiveDirectory backend;
- various other minor changes.
2006-10-05 11:49:17 +00:00

43 lines
1.1 KiB
C

diff -urN -x .svn ../../vendor/vpopmail/vpgsql.c ./vpgsql.c
--- ../../vendor/vpopmail/vpgsql.c Wed Oct 4 13:19:16 2006
+++ ./vpgsql.c Wed Oct 4 21:26:53 2006
@@ -16,6 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
+#include <ctype.h>
#include <pwd.h>
#include <unistd.h>
#include <stdio.h>
@@ -389,6 +390,7 @@
#endif
#ifdef ENABLE_SQL_LOGGING
+#ifdef ENABLE_SQL_REMOVE_DELETED
qnprintf( sqlBufUpdate, SQL_BUF_SIZE,
"delete from vlog where domain = '%s'", domain );
pgres=PQexec(pgc, SqlBufUpdate);
@@ -396,6 +398,7 @@
return(-1);
}
#endif
+#endif
return(0);
}
@@ -442,6 +445,7 @@
#endif
#ifdef ENABLE_SQL_LOGGING
+#ifdef ENABLE_SQL_REMOVE_DELETED
qnprintf( sqlBufUpdate, SQL_BUF_SIZE,
"delete from vlog where domain = '%s' and user='%s'",
domain, user );
@@ -449,6 +453,7 @@
if( !pgres || PGresultStatus(pgres)!=PGRES_COMMAND_OK) {
err = -1;
}
+#endif
#endif
return(err);