[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU Mailutils branch, master, updated. mu-1-2-90-separate-argp-cfg
From: |
Sergey Poznyakoff |
Subject: |
[SCM] GNU Mailutils branch, master, updated. mu-1-2-90-separate-argp-cfg-266-ge68db77 |
Date: |
Mon, 11 May 2009 17:06:49 +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=e68db77391acf334fd6920cbd2c84413dcf5ced0
The branch, master has been updated
via e68db77391acf334fd6920cbd2c84413dcf5ced0 (commit)
from dfae7b2baeb620fe266e5ac6aa6000a7c3acfb5c (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 e68db77391acf334fd6920cbd2c84413dcf5ced0
Author: Sergey Poznyakoff <address@hidden>
Date: Mon May 11 20:03:58 2009 +0300
Bugfixes.
* mailbox/filter.c (filter_close): Do not close transport stream if
the MU_STREAM_NO_CLOSE flag is set.
* imap4d/fetch.c (fetch_io): Fix memory leak: open the filter
with MU_STREAM_NO_CLOSE flag and destroy it after use.
* include/mailutils/header.h (mu_header_set_stream): Comment out.
There is no such function, but perhaps there should be?
* libproto/mbox/folder.c (_folder_mbox_init): If there is no
explicit path in the URL, use ".". This makes it possible to
use URLs like: mbox:file.
* mailbox/nls.c (mu_set_locale) [ENABLE_NLS]: Remove ifdef.
Setlocale must be enabled whenever possible, otherwise
we cannot relay on mu_strftime malfunctions in non-english
locales.
* mh/mh_whom.c (mh_alias_expand): Handle NULL or empty inputs.
-----------------------------------------------------------------------
Summary of changes:
imap4d/fetch.c | 5 ++++-
include/mailutils/header.h | 5 +++--
libproto/mbox/folder.c | 14 +++++++++++++-
mailbox/filter.c | 6 ++++--
mailbox/nls.c | 2 +-
mh/mh_whom.c | 6 ++++++
6 files changed, 31 insertions(+), 7 deletions(-)
diff --git a/imap4d/fetch.c b/imap4d/fetch.c
index 141acc9..092f740 100644
--- a/imap4d/fetch.c
+++ b/imap4d/fetch.c
@@ -692,7 +692,8 @@ fetch_io (mu_stream_t stream, size_t start, size_t size,
size_t max)
size_t n = 0;
mu_off_t offset;
- mu_filter_create (&rfc, stream, "rfc822", MU_FILTER_ENCODE, MU_STREAM_READ);
+ mu_filter_create (&rfc, stream, "rfc822", MU_FILTER_ENCODE,
+ MU_STREAM_READ|MU_STREAM_NO_CHECK|MU_STREAM_NO_CLOSE);
if (start == 0 && size == (size_t) -1)
{
@@ -721,6 +722,7 @@ fetch_io (mu_stream_t stream, size_t start, size_t size,
size_t max)
}
else if (size + 2 < size) /* Check for integer overflow */
{
+ mu_stream_destroy (&rfc, NULL);
return RESP_BAD;
}
else
@@ -751,6 +753,7 @@ fetch_io (mu_stream_t stream, size_t start, size_t size,
size_t max)
util_send (" \"\"");
free (buffer);
}
+ mu_stream_destroy (&rfc, NULL);
return RESP_OK;
}
diff --git a/include/mailutils/header.h b/include/mailutils/header.h
index 29e004a..79ae7e7 100644
--- a/include/mailutils/header.h
+++ b/include/mailutils/header.h
@@ -149,8 +149,9 @@ extern int mu_header_aget_field_value_unfold (mu_header_t
header, size_t num,
char **pvalue);
extern int mu_header_get_stream (mu_header_t, mu_stream_t *);
-extern int mu_header_set_stream (mu_header_t, mu_stream_t, void *);
-
+/* FIXME: This function does not exist:
+ extern int mu_header_set_stream (mu_header_t, mu_stream_t, void *);
+*/
extern int mu_header_size (mu_header_t, size_t *);
extern int mu_header_lines (mu_header_t, size_t *);
diff --git a/libproto/mbox/folder.c b/libproto/mbox/folder.c
index 5863f82..ffa8a5b 100644
--- a/libproto/mbox/folder.c
+++ b/libproto/mbox/folder.c
@@ -159,11 +159,23 @@ _folder_mbox_init (mu_folder_t folder)
return ENOMEM;
status = mu_url_aget_path (folder->url, &dfolder->dirname);
+ if (status == MU_ERR_NOENT)
+ {
+ dfolder->dirname = malloc (2);
+ if (dfolder->dirname == NULL)
+ status = ENOMEM;
+ else
+ {
+ strcpy (dfolder->dirname, ".");
+ status = 0;
+ }
+ }
+
if (status)
{
free (dfolder);
folder->data = NULL;
- return ENOMEM;
+ return status;
}
folder->_destroy = folder_mbox_destroy;
diff --git a/mailbox/filter.c b/mailbox/filter.c
index 3702632..e72fa6f 100644
--- a/mailbox/filter.c
+++ b/mailbox/filter.c
@@ -35,7 +35,7 @@ First draft: Alain Magloire.
#endif
#include <filter0.h>
-
+#include <stream0.h>
#include <mailutils/iterator.h>
#include <mailutils/stream.h>
#include <mailutils/errno.h>
@@ -124,6 +124,8 @@ static int
filter_close (mu_stream_t stream)
{
mu_filter_t filter = mu_stream_get_owner (stream);
+ if (stream->flags & MU_STREAM_NO_CLOSE)
+ return 0;
return mu_stream_close (filter->stream);
}
@@ -161,7 +163,7 @@ mu_filter_get_list (mu_list_t *plist)
int
mu_filter_create (mu_stream_t *pstream, mu_stream_t stream, const char *name,
- int type, int direction)
+ int type, int direction)
{
mu_iterator_t iterator = NULL;
mu_filter_record_t filter_record = NULL;
diff --git a/mailbox/nls.c b/mailbox/nls.c
index df042f6..c548869 100644
--- a/mailbox/nls.c
+++ b/mailbox/nls.c
@@ -36,7 +36,7 @@ char *mu_locale_set;
char *
mu_set_locale (const char *locale)
{
-#if defined HAVE_SETLOCALE && defined ENABLE_NLS
+#if defined HAVE_SETLOCALE
return setlocale (LC_ALL, locale);
#else
return NULL;
diff --git a/mh/mh_whom.c b/mh/mh_whom.c
index 70371c7..d014691 100644
--- a/mh/mh_whom.c
+++ b/mh/mh_whom.c
@@ -59,6 +59,12 @@ mh_alias_expand (const char *str, mu_address_t *paddr, int
*incl)
mu_address_t addr;
int status;
+ if (!str || !*str)
+ {
+ *paddr = NULL;
+ return 0;
+ }
+
if (incl)
*incl = 0;
status = mu_address_create_hint (&addr, str, NULL, 0);
hooks/post-receive
--
GNU Mailutils
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU Mailutils branch, master, updated. mu-1-2-90-separate-argp-cfg-266-ge68db77,
Sergey Poznyakoff <=