Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 155182 Details for
Bug 239215
Evolution escapes 'From ' on sending mail.
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
proposed patch 2/2
eds.patch (text/plain), 7.29 KB, created by
Milan Crha
on 2007-05-22 17:19:57 UTC
(
hide
)
Description:
proposed patch 2/2
Filename:
MIME Type:
Creator:
Milan Crha
Created:
2007-05-22 17:19:57 UTC
Size:
7.29 KB
patch
obsolete
>Index: camel/providers/local/camel-mbox-folder.c >=================================================================== >--- camel/providers/local/camel-mbox-folder.c (revision 7772) >+++ camel/providers/local/camel-mbox-folder.c (working copy) >@@ -238,7 +238,7 @@ > > /* and write the content to the filtering stream, that translates '\nFrom' into '\n>From' */ > filter_stream = (CamelStream *) camel_stream_filter_new_with_stream(output_stream); >- filter_from = (CamelMimeFilter *) camel_mime_filter_from_new(); >+ filter_from = (CamelMimeFilter *) camel_mime_filter_from_new( CAMEL_MIME_FILTER_FROM_ENCODE ); > camel_stream_filter_add((CamelStreamFilter *) filter_stream, filter_from); > if (camel_data_wrapper_write_to_stream((CamelDataWrapper *)message, filter_stream) == -1 > || camel_stream_write(filter_stream, "\n", 1) == -1 >@@ -328,6 +328,7 @@ > int fd, retval; > int retried = FALSE; > off_t frompos; >+ CamelMimeFilter *filter_from = NULL; > > d(printf("Getting message %s\n", uid)); > >@@ -402,6 +403,10 @@ > goto fail; > } > >+ >+ filter_from = (CamelMimeFilter *) camel_mime_filter_from_new( CAMEL_MIME_FILTER_FROM_DECODE ); >+ camel_mime_parser_filter_add (parser, filter_from); >+ > message = camel_mime_message_new(); > if (camel_mime_part_construct_from_parser((CamelMimePart *)message, parser) == -1) { > camel_exception_setv(ex, errno==EINTR?CAMEL_EXCEPTION_USER_CANCEL:CAMEL_EXCEPTION_SYSTEM, >@@ -419,7 +424,10 @@ > > if (parser) > camel_object_unref((CamelObject *)parser); >- >+ >+ if (filter_from) >+ camel_object_unref((CamelObject *)filter_from); >+ > /* use the opportunity to notify of changes (particularly if we had a rebuild) */ > if (camel_folder_change_info_changed(lf->changes)) { > camel_object_trigger_event((CamelObject *)folder, "folder_changed", lf->changes); >Index: camel/ChangeLog >=================================================================== >--- camel/ChangeLog (revision 7772) >+++ camel/ChangeLog (working copy) >@@ -1,3 +1,19 @@ >+2007-05-22 Milan Crha <mcrha@redhat.com> >+ >+ ** Fix for bug #245683 >+ >+ * camel-mime-filter-from.h (camel_mime_filter_from_new): >+ * camel-mime-filter-from.c (camel_mime_filter_from_new, filter): >+ Added support for encoding and decoding future, new enum >+ CamelMimeFilterFromDirection. >+ >+ * camel-movemail.c (camel_movemail_solaris): >+ * providers/local/camel-mbox-folder.c (mbox_append_message): >+ Added parameter for encode into call of camel_mime_filter_from_new >+ >+ * providers/local/camel-mbox-folder.c (mbox_get_message): >+ Added CamelMimeFilterFrom into parse when reading mail content >+ > 2007-05-16 Jules Colding <colding@omesc.com> > > * camel-lock.c (camel_lock_dot): Use g_mkstemp() >Index: camel/camel-movemail.c >=================================================================== >--- camel/camel-movemail.c (revision 7772) >+++ camel/camel-movemail.c (working copy) >@@ -470,7 +470,7 @@ > camel_mime_parser_scan_from(mp, TRUE); > camel_mime_parser_init_with_fd(mp, sfd); > >- ffrom = camel_mime_filter_from_new(); >+ ffrom = camel_mime_filter_from_new( CAMEL_MIME_FILTER_FROM_ENCODE ); > > while (camel_mime_parser_step(mp, &buffer, &len) == CAMEL_MIME_PARSER_STATE_FROM) { > g_assert(camel_mime_parser_from_line(mp)); >Index: camel/camel-mime-filter-from.c >=================================================================== >--- camel/camel-mime-filter-from.c (revision 7772) >+++ camel/camel-mime-filter-from.c (working copy) >@@ -103,16 +103,34 @@ > break; > } > } else { >+ char *gt = NULL; >+ >+ if ( *inptr == '>'){ >+ gt = inptr; >+ while (inptr < inend && *inptr == '>') >+ inptr++; >+ } > if (!strncmp(inptr, "From ", 5)) { >- fromcount++; >- /* yes, we do alloc them on the stack ... at most we're going to get >- len / 7 of them anyway */ >- node = alloca(sizeof(*node)); >- node->pointer = inptr; >- node->next = NULL; >- tail->next = node; >- tail = node; >- inptr += 5; >+ if (f->direction == CAMEL_MIME_FILTER_FROM_ENCODE){ >+ fromcount++; >+ /* yes, we do alloc them on the stack ... at most we're going to get >+ len / 7 of them anyway */ >+ node = alloca(sizeof(*node)); >+ node->pointer = inptr; >+ node->next = NULL; >+ tail->next = node; >+ tail = node; >+ inptr += 5; >+ }else if (gt) { /* && f->direction == CAMEL_MIME_FILTER_FROM_DECODE */ >+ /* we need at least one '>' character */ >+ fromcount++; >+ node = alloca(sizeof(*node)); >+ node->pointer = gt; >+ node->next = NULL; >+ tail->next = node; >+ tail = node; >+ inptr += 5; >+ } > } > } > } else { >@@ -125,16 +143,29 @@ > f->midline = midline; > > if (fromcount > 0) { >- camel_mime_filter_set_size(mf, len + fromcount, FALSE); >- node = head; >- inptr = in; >- outptr = mf->outbuf; >- while (node) { >- memcpy(outptr, inptr, node->pointer - inptr); >- outptr += node->pointer - inptr; >- *outptr++ = '>'; >- inptr = node->pointer; >- node = node->next; >+ if (f->direction == CAMEL_MIME_FILTER_FROM_ENCODE){ >+ camel_mime_filter_set_size(mf, len + fromcount, FALSE); >+ node = head; >+ inptr = in; >+ outptr = mf->outbuf; >+ while (node) { >+ memcpy(outptr, inptr, node->pointer - inptr); >+ outptr += node->pointer - inptr; >+ *outptr++ = '>'; >+ inptr = node->pointer; >+ node = node->next; >+ } >+ }else{ /* f->direction == CAMEL_MIME_FILTER_FROM_DECODE */ >+ camel_mime_filter_set_size(mf, len - fromcount, FALSE); >+ node = head; >+ inptr = in; >+ outptr = mf->outbuf; >+ while (node) { >+ memcpy(outptr, inptr, node->pointer - inptr); >+ outptr += node->pointer - inptr; >+ inptr = node->pointer + 1; >+ node = node->next; >+ } > } > memcpy(outptr, inptr, inend - inptr); > outptr += inend - inptr; >@@ -172,15 +203,19 @@ > > /** > * camel_mime_filter_from_new: >+ * @direction: encode vs decode > * > * Create a new #CamelMimeFilterFrom object. > * > * Returns a new #CamelMimeFilterFrom object > **/ > CamelMimeFilterFrom * >-camel_mime_filter_from_new (void) >+camel_mime_filter_from_new (CamelMimeFilterFromDirection direction) > { > CamelMimeFilterFrom *new = CAMEL_MIME_FILTER_FROM ( camel_object_new (camel_mime_filter_from_get_type ())); >+ >+ new->direction = direction; >+ > return new; > } > >@@ -197,7 +232,7 @@ > g_tk_init(&argc, &argv); > > >- f = camel_mime_filter_from_new(); >+ f = camel_mime_filter_from_new( CAMEL_MIME_FILTER_FROM_ENCODE ); > > buffer = "This is a test\nFrom Someone\nTo someone. From Someone else, From\n From blah\nFromblah\nBye! \nFrom "; > len = strlen(buffer); >Index: camel/camel-mime-filter-from.h >=================================================================== >--- camel/camel-mime-filter-from.h (revision 7772) >+++ camel/camel-mime-filter-from.h (working copy) >@@ -34,9 +34,15 @@ > typedef struct _CamelMimeFilterFrom CamelMimeFilterFrom; > typedef struct _CamelMimeFilterFromClass CamelMimeFilterFromClass; > >+typedef enum { >+ CAMEL_MIME_FILTER_FROM_ENCODE, >+ CAMEL_MIME_FILTER_FROM_DECODE >+} CamelMimeFilterFromDirection; >+ > struct _CamelMimeFilterFrom { > CamelMimeFilter parent; > >+ CamelMimeFilterFromDirection direction; > int midline; /* are we between lines? */ > }; > >@@ -45,7 +51,7 @@ > }; > > CamelType camel_mime_filter_from_get_type (void); >-CamelMimeFilterFrom *camel_mime_filter_from_new (void); >+CamelMimeFilterFrom *camel_mime_filter_from_new (CamelMimeFilterFromDirection direction); > > G_END_DECLS >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 239215
:
155181
| 155182