[svn] GpgOL - r252 - in trunk: . po src
svn author wk
cvs at cvs.gnupg.org
Wed May 28 10:10:19 CEST 2008
Author: wk
Date: 2008-05-28 10:10:17 +0200 (Wed, 28 May 2008)
New Revision: 252
Modified:
trunk/NEWS
trunk/configure.ac
trunk/po/de.po
trunk/po/sv.po
trunk/src/ChangeLog
trunk/src/mapihelp.cpp
trunk/src/mimemaker.c
trunk/src/mimeparser.c
Log:
Do not sent a message if the backend did not sent any data.
Typo fixes.
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2008-05-06 09:11:41 UTC (rev 251)
+++ trunk/src/ChangeLog 2008-05-28 08:10:17 UTC (rev 252)
@@ -1,3 +1,14 @@
+2008-05-23 Werner Koch <wk at g10code.com>
+
+ * mimemaker.c (struct sink_s): Add field ENC_COUNTER.
+ (write_buffer_for_cb): Update that.
+ (mime_encrypt): Bail out if no data has been encrypted.
+ (mime_sign_encrypt): Ditto.
+
+2008-05-07 Werner Koch <wk at g10code.com>
+
+ * mimeparser.c (t2body): Fix last change.
+
2008-05-02 Werner Koch <wk at g10code.com>
* mimeparser.c (t2body): Detect non-inline text parts.
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2008-05-06 09:11:41 UTC (rev 251)
+++ trunk/NEWS 2008-05-28 08:10:17 UTC (rev 252)
@@ -1,3 +1,9 @@
+Noteworthy changes for version 0.10.14 (2008-05-28)
+===================================================
+
+ * Minor fixes.
+
+
Noteworthy changes for version 0.10.13 (2008-05-06)
===================================================
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2008-05-06 09:11:41 UTC (rev 251)
+++ trunk/configure.ac 2008-05-28 08:10:17 UTC (rev 252)
@@ -16,7 +16,7 @@
# Remember to change the version number immediately *after* a release.
# Set my_issvn to "yes" for non-released code. Remember to run an
# "svn up" and "autogen.sh" right before creating a distribution.
-m4_define([my_version], [0.10.13])
+m4_define([my_version], [0.10.14])
m4_define([my_issvn], [no])
m4_define([svn_revision], m4_esyscmd([echo -n $( (svn info 2>/dev/null \
Modified: trunk/po/de.po [not shown]
Modified: trunk/po/sv.po [not shown]
Modified: trunk/src/mapihelp.cpp
===================================================================
--- trunk/src/mapihelp.cpp 2008-05-06 09:11:41 UTC (rev 251)
+++ trunk/src/mapihelp.cpp 2008-05-28 08:10:17 UTC (rev 252)
@@ -560,7 +560,7 @@
class after accessing them. Thus in old stores there may be a
lot of *.CexEnc message which are actually just signed.
- 2. Is the smime-typeparameter is missing we need another way to
+ 2. If the smime-type parameter is missing we need another way to
decide whether to decrypt or to verify.
*/
static int
Modified: trunk/src/mimemaker.c
===================================================================
--- trunk/src/mimemaker.c 2008-05-06 09:11:41 UTC (rev 251)
+++ trunk/src/mimemaker.c 2008-05-28 08:10:17 UTC (rev 252)
@@ -63,6 +63,7 @@
void *cb_data;
sink_t extrasink;
int (*writefnc)(sink_t sink, const void *data, size_t datalen);
+ unsigned long enc_counter; /* Used by write_buffer_for_cb. */
/* struct { */
/* int idx; */
/* unsigned char inbuf[4]; */
@@ -237,7 +238,7 @@
{
if (!sink || !sink->writefnc)
{
- log_error ("%s:%s: sink not properliy setup", SRCNAME, __func__);
+ log_error ("%s:%s: sink not properly setup", SRCNAME, __func__);
return -1;
}
return sink->writefnc (sink, data, datalen);
@@ -250,6 +251,7 @@
write_buffer_for_cb (void *opaque, const void *data, size_t datalen)
{
sink_t sink = opaque;
+ sink->enc_counter += datalen;
return write_buffer (sink, data, datalen) ? -1 : datalen;
}
@@ -1565,8 +1567,8 @@
return -1;
/* Prepare the encryption. We do this early as it is quite common
- that some recipients are not be available and thus the encryption
- will fail early. */
+ that some recipient keys are not available and thus the
+ encryption will fail early. */
if (engine_create_filter (&filter, write_buffer_for_cb, sink))
goto failure;
if (engine_encrypt_prepare (filter, hwnd, protocol, recipients, &protocol))
@@ -1639,7 +1641,13 @@
goto failure;
filter = NULL; /* Not valid anymore. */
encsink->cb_data = NULL; /* Not needed anymore. */
-
+
+ if (!sink->enc_counter)
+ {
+ log_debug ("%s:%s: nothing received from engine", SRCNAME, __func__);
+ goto failure;
+ }
+
/* Write the final boundary (for OpenPGP) and finish the attachment. */
if (*boundary && (rc = write_boundary (sink, boundary, 1)))
goto failure;
@@ -1799,6 +1807,12 @@
goto failure;
filter = NULL; /* Not valid anymore. */
encsink->cb_data = NULL; /* Not needed anymore. */
+
+ if (!sink->enc_counter)
+ {
+ log_debug ("%s:%s: nothing received from engine", SRCNAME, __func__);
+ goto failure;
+ }
/* Write the final boundary (for OpenPGP) and finish the attachment. */
if (*boundary && (rc = write_boundary (sink, boundary, 1)))
Modified: trunk/src/mimeparser.c
===================================================================
--- trunk/src/mimeparser.c 2008-05-06 09:11:41 UTC (rev 251)
+++ trunk/src/mimeparser.c 2008-05-28 08:10:17 UTC (rev 252)
@@ -733,7 +733,7 @@
if (s)
filename = xstrdup (s);
s = rfc822parse_query_parameter (field, NULL, 1);
- if (s && !strcmp (s, "inline"))
+ if (s && strcmp (s, "inline"))
not_inline_text = 1;
rfc822parse_release_field (field);
}
More information about the Gnupg-commits
mailing list