diff options
-rw-r--r-- | camel/ChangeLog | 8 | ||||
-rw-r--r-- | camel/providers/smtp/camel-smtp-transport.c | 5 |
2 files changed, 11 insertions, 2 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 6ea9f7d363..1481d626bf 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,11 @@ +2000-05-17 Dan Winship <danw@helixcode.com> + + * providers/smtp/camel-smtp-transport.c + (smtp_get_email_addr_from_text): fix an off-by-one error in + address parsing + (smtp_data): use camel_data_wrapper_get_output_stream rather than + data_wrapper->output_stream + 2000-05-17 NotZed <NotZed@HelixCode.com> * providers/mbox/camel-mbox-folder.c (message_changed): Snoop diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c index 5b9e858a65..b7af97674e 100644 --- a/camel/providers/smtp/camel-smtp-transport.c +++ b/camel/providers/smtp/camel-smtp-transport.c @@ -29,6 +29,7 @@ #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> +#include <arpa/inet.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> @@ -437,7 +438,7 @@ static gchar /* now addr_strt & addr_end point to the beginning & ending of the email addy */ /* copy the string into addr */ - addr = g_strndup(addr_strt, (gint)(addr_end - addr_strt)); + addr = g_strndup(addr_strt, (gint)(addr_end - addr_strt + 1)); for (ptr1 = addr_strt; ptr1 <= addr_end; ptr1++) /* look for an '@' sign */ if (*ptr1 == '@') @@ -614,7 +615,7 @@ smtp_data (CamelSmtpTransport *transport, CamelMedium *message, CamelException * } /* now to send the actual data */ - message_stream = camel_stream_buffer_new(CAMEL_DATA_WRAPPER (message)->output_stream, CAMEL_STREAM_BUFFER_READ); + message_stream = camel_stream_buffer_new(camel_data_wrapper_get_output_stream (CAMEL_DATA_WRAPPER (message)), CAMEL_STREAM_BUFFER_READ); while (1) { /* send 1 line at a time */ buf = camel_stream_buffer_read_line (CAMEL_STREAM_BUFFER(message_stream), ex); |