[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU Mailutils branch, master, updated. release-2.2-656-gb076979
From: |
Sergey Poznyakoff |
Subject: |
[SCM] GNU Mailutils branch, master, updated. release-2.2-656-gb076979 |
Date: |
Sat, 25 May 2013 11:54:35 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Mailutils".
http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=b0769798ab5dc2daaca5559289eac6714554568b
The branch, master has been updated
via b0769798ab5dc2daaca5559289eac6714554568b (commit)
from 43d9797eef76ba39c987f227d8ac44983ce201e4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b0769798ab5dc2daaca5559289eac6714554568b
Author: Sergey Poznyakoff <address@hidden>
Date: Sat May 25 14:52:16 2013 +0300
Bugfixes.
* imap4d/io.c (imap4d_tokbuf_decrlf): Rewrite to run in
O(n).
* libmailutils/server/ipsrv.c (mu_ip_tcp_accept): Return 0 on
EINTR (unless srv->f_intr tells otherwise) and EAGAIN. The caller
will retry.
(mu_ip_server_accept): output a diagnostic message before
returning error.
-----------------------------------------------------------------------
Summary of changes:
imap4d/io.c | 13 +++++++------
libmailutils/server/ipsrv.c | 18 +++++++++++++-----
2 files changed, 20 insertions(+), 11 deletions(-)
diff --git a/imap4d/io.c b/imap4d/io.c
index 9257400..21c3f2a 100644
--- a/imap4d/io.c
+++ b/imap4d/io.c
@@ -436,16 +436,17 @@ imap4d_tokbuf_decrlf (struct imap4d_tokbuf *tok, size_t
off, size_t *plen)
size_t len = *plen;
char *p, *end = buf + len;
- for (p = end - 1; p > buf; p--)
+ for (p = buf; p < end; )
{
- if (*p == '\n' && p > buf && p[-1] == '\r')
+ if (*p == '\r' && p + 1 < end && p[1] == '\n')
{
- memmove (p - 1, p, end - p);
- end--;
- p--;
+ p++;
+ len--;
}
+ else
+ *buf++ = *p++;
}
- *plen = end - buf;
+ *plen = len;
}
static void
diff --git a/libmailutils/server/ipsrv.c b/libmailutils/server/ipsrv.c
index fa70863..9ba9c0f 100644
--- a/libmailutils/server/ipsrv.c
+++ b/libmailutils/server/ipsrv.c
@@ -361,10 +361,14 @@ mu_ip_tcp_accept (mu_ip_server_t srv, void *call_data)
if (connfd == -1)
{
int ec = errno;
- if (ec == EINTR)
- {
- if (srv->f_intr && srv->f_intr (srv->data, call_data))
- mu_ip_server_shutdown (srv);
+ switch (ec)
+ {
+ case EINTR:
+ if (srv->f_intr && srv->f_intr (srv->data, call_data))
+ break;
+ /* fall through */
+ case EAGAIN:
+ ec = 0;
}
return ec;
}
@@ -493,7 +497,11 @@ mu_ip_server_accept (mu_ip_server_t srv, void *call_data)
}
if (rc)
- mu_ip_server_shutdown (srv);
+ {
+ mu_error (_("socket error on \"%s\": %s"), IDENTSTR (srv),
+ mu_strerror (rc));
+ mu_ip_server_shutdown (srv);
+ }
return rc;
}
hooks/post-receive
--
GNU Mailutils
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU Mailutils branch, master, updated. release-2.2-656-gb076979,
Sergey Poznyakoff <=