[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mailutils imap4d 20020713 problems
From: |
Sergey Poznyakoff |
Subject: |
Re: mailutils imap4d 20020713 problems |
Date: |
Wed, 24 Jul 2002 00:01:48 +0300 |
> Straces sent in private mail, I haven't looked too much for sensible
> info in them.
Thanks, it helped. Here goes the patch. Please, inform me if it works.
Regards,
Sergey
Index: imap4d/fetch.c
===================================================================
RCS file: /cvsroot/mailutils/mailutils/imap4d/fetch.c,v
retrieving revision 1.27
diff -p -u -w -b -r1.27 fetch.c
--- imap4d/fetch.c 16 Dec 2001 05:34:16 -0000 1.27
+++ imap4d/fetch.c 23 Jul 2002 20:59:13 -0000
@@ -568,7 +568,7 @@ fetch_envelope0 (message_t msg)
/* Note that the server MUST default the reply-to and sender fields from
the From field; a client is not expected to know to do this. */
header_aget_value (header, "Sender", &buffer);
- fetch_send_address ((*buffer == '\0') ? from : buffer);
+ fetch_send_address (buffer ? buffer : from);
free (buffer);
util_send (" ");
@@ -576,7 +576,7 @@ fetch_envelope0 (message_t msg)
/* Note that the server MUST default the reply-to and sender fields from
the From field; a client is not expected to know to do this. */
header_aget_value (header, "Reply-to", &buffer);
- fetch_send_address ((*buffer == '\0') ? from : buffer);
+ fetch_send_address (buffer ? buffer : from);
free (buffer);
util_send (" ");
@@ -664,7 +664,8 @@ fetch_bodystructure0 (message_t message,
message_get_header (message, &header);
/* The subtype. */
- header_aget_value (header, MU_HEADER_CONTENT_TYPE, &buffer);
+ if (header_aget_value (header, MU_HEADER_CONTENT_TYPE, &buffer) == 0)
+ {
s = strtok_r (buffer, " \t\r\n;", &sp);
if (s)
{
@@ -672,6 +673,7 @@ fetch_bodystructure0 (message_t message,
if (s)
*s++ = '\0';
}
+ }
util_send (" ");
util_send_qstring (s);
@@ -787,9 +789,8 @@ bodystructure (message_t msg, int extens
/* body type: Content-Type
body subtype: */
- header_aget_value (header, MU_HEADER_CONTENT_TYPE, &buffer);
- s = strtok_r (buffer, " \t\r\n;", &sp);
- if (s)
+ if (header_aget_value (header, MU_HEADER_CONTENT_TYPE, &buffer) == 0
+ && (s = strtok_r (buffer, " \t\r\n;", &sp)) != NULL)
{
char *p = strchr (s, '/');
if (strcasecmp (s, "MESSAGE/RFC822") == 0)
@@ -865,7 +866,7 @@ bodystructure (message_t msg, int extens
/* body encoding: Content-Transfer-Encoding. */
header_aget_value (header, MU_HEADER_CONTENT_TRANSFER_ENCODING, &buffer);
util_send (" ");
- util_send_qstring ((*buffer) ? buffer : "7BIT");
+ util_send_qstring (buffer ? buffer : "7BIT");
free (buffer);
/* body size RFC822 format. */
@@ -1211,12 +1212,9 @@ fetch_header_fields (message_t msg, char
{
char *value = NULL;
size_t n = 0;
- header_aget_value (header, array[j], &value);
- if (*value == '\0')
- {
- free (value);
+ if (header_aget_value (header, array[j], &value))
continue;
- }
+
n = asprintf (&buffer, "%s: %s\n", array[j], value);
status = stream_write (stream, buffer, n, off, &n);
off += n;
- mailutils imap4d 20020713 problems, Jordi Mallach, 2002/07/23
- Re: mailutils imap4d 20020713 problems, Sergey Poznyakoff, 2002/07/23
- Re: mailutils imap4d 20020713 problems, Jeff Bailey, 2002/07/23
- Re: mailutils imap4d 20020713 problems, Jordi Mallach, 2002/07/23
- Re: mailutils imap4d 20020713 problems,
Sergey Poznyakoff <=
- Re: mailutils imap4d 20020713 problems, Jordi Mallach, 2002/07/23
- Re: mailutils imap4d 20020713 problems, Sergey Poznyakoff, 2002/07/24
- Re: mailutils imap4d 20020713 problems, Jordi Mallach, 2002/07/24
- Re: mailutils imap4d 20020713 problems, Jeff Bailey, 2002/07/24
- Re: mailutils imap4d 20020713 problems, Jordi Mallach, 2002/07/24