- do not fill logs with mail (de)compression messages (#528093)

This commit is contained in:
Michal Hlavinka 2009-11-05 13:27:46 +00:00
parent b91cae1db0
commit 7c8f77442a
2 changed files with 81 additions and 1 deletions

View File

@ -0,0 +1,73 @@
diff -up cyrus-imapd-2.3.15/lib/prot.c.nodebug cyrus-imapd-2.3.15/lib/prot.c
--- cyrus-imapd-2.3.15/lib/prot.c.nodebug 2009-11-05 14:20:53.845020152 +0100
+++ cyrus-imapd-2.3.15/lib/prot.c 2009-11-05 14:21:35.932145246 +0100
@@ -329,7 +329,7 @@ static int is_incompressible(const char
while (sig->type) {
if (n >= sig->len && !memcmp(p, sig->sig, sig->len)) {
- syslog(LOG_DEBUG, "data is %s", sig->type);
+// syslog(LOG_DEBUG, "data is %s", sig->type);
return 1;
}
sig++;
@@ -642,14 +642,14 @@ int prot_fill(struct protstream *s)
s->zstrm->next_out = s->zbuf;
s->zstrm->avail_out = s->zbuf_size;
- syslog(LOG_DEBUG, "inflate(%d bytes)", s->cnt);
+// syslog(LOG_DEBUG, "inflate(%d bytes)", s->cnt);
do {
if (!s->zstrm->avail_out) {
/* Need more space to decompress */
- syslog(LOG_DEBUG,
- "growing decompress buffer from %d to %d bytes",
- s->zbuf_size, s->zbuf_size + PROT_BUFSIZE);
+// syslog(LOG_DEBUG,
+// "growing decompress buffer from %d to %d bytes",
+// s->zbuf_size, s->zbuf_size + PROT_BUFSIZE);
s->zbuf = (unsigned char *)
xrealloc(s->zbuf, s->zbuf_size + PROT_BUFSIZE);
@@ -670,7 +670,7 @@ int prot_fill(struct protstream *s)
s->ptr = s->zbuf;
s->cnt = s->zbuf_size - s->zstrm->avail_out;
- syslog(LOG_DEBUG, " => decompressed to %d bytes", s->cnt);
+// syslog(LOG_DEBUG, " => decompressed to %d bytes", s->cnt);
}
#endif /* HAVE_ZLIB */
@@ -760,8 +760,8 @@ static int prot_flush_encode(struct prot
* Oversize the buffer, so we (hopefully) eliminate
* multiple small incremental reallocations.
*/
- syslog(LOG_DEBUG, "growing compress buffer from %u to %lu bytes",
- s->zbuf_size, def_size + PROT_BUFSIZE);
+// syslog(LOG_DEBUG, "growing compress buffer from %u to %lu bytes",
+// s->zbuf_size, def_size + PROT_BUFSIZE);
s->zbuf_size = def_size + PROT_BUFSIZE;
s->zbuf = (unsigned char *) xrealloc(s->zbuf, s->zbuf_size);
@@ -772,9 +772,9 @@ static int prot_flush_encode(struct prot
s->zstrm->next_out = s->zbuf;
s->zstrm->avail_out = s->zbuf_size;
- syslog(LOG_DEBUG, "deflate(%d bytes, level=%d, flush=%s)",
- left, s->zlevel,
- zflush == Z_FULL_FLUSH ? "FULL" : "SYNC");
+// syslog(LOG_DEBUG, "deflate(%d bytes, level=%d, flush=%s)",
+// left, s->zlevel,
+// zflush == Z_FULL_FLUSH ? "FULL" : "SYNC");
if (s->boundary) {
/* Set (new) compression level */
@@ -791,7 +791,7 @@ static int prot_flush_encode(struct prot
ptr = s->zbuf;
left = s->zbuf_size - s->zstrm->avail_out;
- syslog(LOG_DEBUG, " => compressed to %d bytes", left);
+// syslog(LOG_DEBUG, " => compressed to %d bytes", left);
}
#endif /* HAVE_ZLIB */

View File

@ -1,6 +1,6 @@
Name: cyrus-imapd Name: cyrus-imapd
Version: 2.3.15 Version: 2.3.15
Release: 4%{?dist} Release: 5%{?dist}
%define _dbver db4 %define _dbver db4
@ -71,6 +71,9 @@ Patch19: cyrus-imapd-2.3.12p2-current-db.patch
Patch20: cyrus-imapd-2.3.15-bufov.patch Patch20: cyrus-imapd-2.3.15-bufov.patch
# required for c-i <= 2.3.15, rhbz#528093
Patch21: cyrus-imapd-2.3.15-nodebug.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: autoconf >= 2.59 BuildRequires: autoconf >= 2.59
@ -160,6 +163,7 @@ one running the server.
%patch18 -p1 -b .krb4 %patch18 -p1 -b .krb4
%patch19 -p1 -b .db4.7 %patch19 -p1 -b .db4.7
%patch20 -p1 -b .bufov %patch20 -p1 -b .bufov
%patch21 -p1 -b .nodebug
# only to update config.* files # only to update config.* files
automake -a -f -c || : automake -a -f -c || :
@ -592,6 +596,9 @@ fi
%{_mandir}/man1/* %{_mandir}/man1/*
%changelog %changelog
* Thu Nov 05 2009 Michal Hlavinka <mhlavink@redhat.com> - 2.3.15-5
- do not fill logs with mail (de)compression messages (#528093)
* Thu Oct 29 2009 Michal Hlavinka <mhlavink@redhat.com> - 2.3.15-4 * Thu Oct 29 2009 Michal Hlavinka <mhlavink@redhat.com> - 2.3.15-4
- spec cleanup - spec cleanup