From c31584940de38cde492c71ef2ad26f8d9e304d5e Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Fri, 26 Apr 2002 19:03:35 +0000 Subject: Check for empty-string pgp-key ids and don't use them. 2002-04-26 Jeffrey Stedfast * e-msg-composer.c (build_message): Check for empty-string pgp-key ids and don't use them. svn path=/trunk/; revision=16596 --- composer/ChangeLog | 5 +++++ composer/e-msg-composer.c | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/composer/ChangeLog b/composer/ChangeLog index 5fa8f387b7..a8c5e331e5 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,8 @@ +2002-04-26 Jeffrey Stedfast + + * e-msg-composer.c (build_message): Check for empty-string pgp-key + ids and don't use them. + 2002-04-16 Jeffrey Stedfast * e-msg-composer-hdrs.c (destroy): Unref the priv->tooltips object diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 178b867004..368274600b 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -131,7 +131,7 @@ static GtkTargetEntry drop_types[] = { { "text/x-vcard", 0, DND_TYPE_TEXT_VCARD }, }; -static const int num_drop_types = sizeof (drop_types) / sizeof (drop_types[0]); +static int num_drop_types = sizeof (drop_types) / sizeof (drop_types[0]); static GnomeAppClass *parent_class = NULL; @@ -485,7 +485,7 @@ build_message (EMsgComposer *composer) camel_exception_init (&ex); - if (hdrs->account && hdrs->account->pgp_key) { + if (hdrs->account && hdrs->account->pgp_key && *hdrs->account->pgp_key) { pgpid = hdrs->account->pgp_key; } else { /* time for plan b */ @@ -518,7 +518,7 @@ build_message (EMsgComposer *composer) if (hdrs->account && hdrs->account->pgp_encrypt_to_self) { CamelInternetAddress *from = NULL; - if (hdrs->account->pgp_key) { + if (hdrs->accounts && hdrs->account->pgp_key && *hdrs->account->pgp_key) { address = hdrs->account->pgp_key; } else { /* time for plan b */ @@ -579,7 +579,7 @@ build_message (EMsgComposer *composer) camel_exception_init (&ex); - if (hdrs->account && hdrs->account->smime_key) { + if (hdrs->account && hdrs->account->smime_key && *hdrs->account->smime_key) { certname = hdrs->account->smime_key; } else { /* time for plan b */ @@ -613,7 +613,7 @@ build_message (EMsgComposer *composer) /* check to see if we should encrypt to self */ if (hdrs->account && hdrs->account->smime_encrypt_to_self) { - if (hdrs->account->smime_key) { + if (hdrs->account && hdrs->account->smime_key && *hdrs->account->smime_key) { address = hdrs->account->smime_key; } else { /* time for plan b */ -- cgit v1.2.3