Removed. I just realised that we ALWAYS want to get gpg's stderr in UTF-8,
authorJeffrey Stedfast <fejj@ximian.com>
Wed, 9 Apr 2003 23:21:15 +0000 (23:21 +0000)
committerJeffrey Stedfast <fejj@src.gnome.org>
Wed, 9 Apr 2003 23:21:15 +0000 (23:21 +0000)
commit78c37382dcaa87bcd04a2815295ebf0ac858a5b7
treeb78d65849f0062a03eab100deda4cac064ed391f
parentb46346cd88bbb8005a5ad3194898a41309979f0a
Removed. I just realised that we ALWAYS want to get gpg's stderr in UTF-8,

2003-04-09  Jeffrey Stedfast  <fejj@ximian.com>

* camel-gpg-context.c (gpg_ctx_get_utf8_diagnostics): Removed. I
just realised that we ALWAYS want to get gpg's stderr in UTF-8, so
the better solution (plus less code duplication) is to just have
the diagnostics buffer be a CamelStreamMem with a charset filter.
(gpg_ctx_new): Setup a filter stream to convert our gpg stderr
diagnostics into UTF-8 if needed.
(gpg_ctx_free): Unref the diagnostcis stream.
(gpg_ctx_parse_status): Flush the diagnostics stream if we are
going to use the data in an exception.
(gpg_ctx_op_step): Use camel_stream_write() to append to the
diagnostics stream rather than appending the buffer to a
GByteArray like we used to do.
(gpg_ctx_op_step): Flush the diagnostics stream here too.
(gpg_verify): Use a const char *diagnostics string here, forcing a
slight rearrangement of calls - use the const char *dignostics
before we gpg_ctx_free, otherwise we'll be passing free'd memory
off to the cipher_validity.
(gpg_ctx_get_diagnostics): Do the work here to flush the
diagnostics stream and nul-terminate the buffer. Also return const
now, instead of strdupping. No need for that.
(gpg_ctx_parse_status): Convert the user hint to UTF-8.
camel/ChangeLog
camel/camel-gpg-context.c