[svn] GPGol - r100 - in trunk: . src
svn author wk
cvs at cvs.gnupg.org
Mon Sep 19 18:47:56 CEST 2005
Author: wk
Date: 2005-09-19 18:47:55 +0200 (Mon, 19 Sep 2005)
New Revision: 100
Modified:
trunk/ChangeLog
trunk/NEWS
trunk/README
trunk/TODO
trunk/configure.ac
trunk/src/ChangeLog
trunk/src/gpgmsg.cpp
trunk/src/intern.h
trunk/src/main.c
trunk/src/msgcache.c
trunk/src/olflange.cpp
trunk/src/passcache.c
Log:
About to release 0.9.1
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2005-09-19 10:00:26 UTC (rev 99)
+++ trunk/ChangeLog 2005-09-19 16:47:55 UTC (rev 100)
@@ -1,6 +1,10 @@
+2005-09-19 Werner Koch <wk at g10code.com>
+
+ Released 0.9.1.
+
2005-09-04 Werner Koch <wk at g10code.com>
- Release version 0.9.0.
+ Released 0.9.0.
2005-08-30 Werner Koch <wk at g10code.com>
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2005-09-19 10:00:26 UTC (rev 99)
+++ trunk/NEWS 2005-09-19 16:47:55 UTC (rev 100)
@@ -1,3 +1,9 @@
+Noteworthy changes for version 0.9.1 (2005-09-19)
+=================================================
+
+* Bug fixes
+
+
Noteworthy changes for version 0.9.0 (2005-09-04)
=================================================
Modified: trunk/README
===================================================================
--- trunk/README 2005-09-19 10:00:26 UTC (rev 99)
+++ trunk/README 2005-09-19 16:47:55 UTC (rev 100)
@@ -12,7 +12,7 @@
To install this plugin, copy it to some directory (e.g. where gpg lives),
make sure that the libgpg-error.dll and gpgme.dll are available in a
directory where Windows searches for DLLs (e.g. c:\winnt\system32),
-stop Outlook, run the command "regsvr32 outlgpg.dll" and start
+stop Outlook, run the command "regsvr32 gpgol.dll" and start
Outlook. You should then find a new tab named "GnuPG" in Outlook's
option menu.
@@ -25,7 +25,7 @@
debugging - any BFD cracks who can lend me a helping hand? (wk).
Bug reporting: First click on the logo on the GnuPG options tab to
-check whether a neer version has been released - try this first. If
+check whether a newer version has been released - try this first. If
this does not help, check out the mailing lists and also the bug
archive at http://bugs.gnupg.org (use username and password "guest",
select "query" and there category "gpgol") if you did not found any
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2005-09-19 10:00:26 UTC (rev 99)
+++ trunk/TODO 2005-09-19 16:47:55 UTC (rev 100)
@@ -11,7 +11,9 @@
same holds true for HrSetOneProp. We might want to use OpenProperty
for longer texts.
-* IMPORTANT: msgcache.c grows without limit - fix it.
+* Hook into OnDelivery and rename attachments named like the
+ Attestation attachment we generate locally. We might also want to
+ detect whether this is an encrypted message and change the
+ MessageClass accordingly.
-* Hook into OnDelivery and rename attachments named like the
- Attestation attachment we generate locally.
+
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2005-09-19 10:00:26 UTC (rev 99)
+++ trunk/configure.ac 2005-09-19 16:47:55 UTC (rev 100)
@@ -15,7 +15,7 @@
# Version number: Remember to change it immediately *after* a release.
# Add a "-cvs" prefix for non-released code.
-AC_INIT(gpgol, 0.9.0, bug-gpgol at g10code.com)
+AC_INIT(gpgol, 0.9.1, bug-gpgol at g10code.com)
NEED_GPGME_API=1
NEED_GPGME_VERSION=1.1.0
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2005-09-19 10:00:26 UTC (rev 99)
+++ trunk/src/ChangeLog 2005-09-19 16:47:55 UTC (rev 100)
@@ -1,5 +1,14 @@
2005-09-19 Werner Koch <wk at g10code.com>
+ * msgcache.c (flush_if_needed): New.
+ (msgcache_put): use it.
+
+ * intern.h (opt): New compatibility flags AUTO_DECRYPT and
+ NO_ATTESTATION.
+ * olflange.cpp (InstallCommands): Use watcher stuff only when this
+ option has been enabled.
+ * gpgmsg.cpp (decrypt): Take care of NO_ATTESTATION.
+
* main.c (DllMain): Removed debug output; this should not be
used before initialization!
Modified: trunk/src/gpgmsg.cpp
===================================================================
--- trunk/src/gpgmsg.cpp 2005-09-19 10:00:26 UTC (rev 99)
+++ trunk/src/gpgmsg.cpp 2005-09-19 16:47:55 UTC (rev 100)
@@ -920,7 +920,7 @@
log_debug ("%s:%s: we already have an attestation\n",
__FILE__, __func__);
}
- else if (!attestation)
+ else if (!attestation && !opt.compat.no_attestation)
gpgme_data_new (&attestation);
@@ -1163,7 +1163,7 @@
failed. */
}
- set_x_header (message, "GPGol-Version", PACKAGE_VERSION);
+ set_x_header (message, "Gpgol-Version", PACKAGE_VERSION);
/* Now that we successfully processed the attachments, we can save
the changes to the body. For unknown reasons we need to set it
@@ -1320,7 +1320,7 @@
}
}
- set_x_header (message, "GPGol-Version", PACKAGE_VERSION);
+ set_x_header (message, "Gpgol-Version", PACKAGE_VERSION);
/* Now that we successfully processed the attachments, we can save
the changes to the body. For unknown reasons we need to set it
Modified: trunk/src/intern.h
===================================================================
--- trunk/src/intern.h 2005-09-19 10:00:26 UTC (rev 99)
+++ trunk/src/intern.h 2005-09-19 16:47:55 UTC (rev 100)
@@ -108,8 +108,10 @@
unsigned int no_msgcache:1;
unsigned int no_pgpmime:1;
unsigned int no_oom_write:1; /* Don't write using Outlooks object model. */
- unsigned int preview_decryption:1;
+ unsigned int preview_decryption:1; /* Decrypt in preview window. */
unsigned int old_reply_hack: 1; /* See gpgmsg.cpp:decrypt. */
+ unsigned int auto_decrypt: 1; /* Try to decrypt when clicked. */
+ unsigned int no_attestation: 1; /* Don't create an attestation. */
} compat;
} opt;
Modified: trunk/src/main.c
===================================================================
--- trunk/src/main.c 2005-09-19 10:00:26 UTC (rev 99)
+++ trunk/src/main.c 2005-09-19 16:47:55 UTC (rev 100)
@@ -344,6 +344,8 @@
case 2: opt.compat.no_oom_write = x; break;
case 3: opt.compat.preview_decryption = x; break;
case 4: opt.compat.old_reply_hack = x; break;
+ case 5: opt.compat.auto_decrypt = x; break;
+ case 6: opt.compat.no_attestation = x; break;
}
}
log_debug ("Note: using compatibility flags: %s", val);
Modified: trunk/src/msgcache.c
===================================================================
--- trunk/src/msgcache.c 2005-09-19 10:00:26 UTC (rev 99)
+++ trunk/src/msgcache.c 2005-09-19 16:47:55 UTC (rev 100)
@@ -74,6 +74,12 @@
#include "util.h"
+/* We limit the size of the cache to this value. The cache might take
+ up more space temporary if a new message is larger than this values
+ or if several thereads are currently accessing the cache. */
+#define MAX_CACHESIZE (512*1024) /* 512k */
+
+
/* A Item to hold a cache message, i.e. the plaintext and a key. */
struct cache_item
{
@@ -144,7 +150,44 @@
}
+/* Flush entries from the cache if it gets too large. NOTE: This
+ function needs to be called with a locked cache. NEWSIZE is the
+ size of the message we want to put in the cache later. */
+static void
+flush_if_needed (size_t newsize)
+{
+ cache_item_t item, prev;
+ size_t total;
+
+ for (total = newsize, item = the_cache; item; item = item->next)
+ total += item->length;
+ if (total <= MAX_CACHESIZE)
+ return;
+
+ /* Our algorithm to remove entries is pretty simple: We remove
+ entries from the end until we are below the maximum size. */
+ again:
+ for (item = the_cache, prev = NULL; item; prev = item, item = item->next)
+ if ( !item->next && !item->ref)
+ {
+ if (prev)
+ prev->next = NULL;
+ else
+ the_cache = NULL;
+ if (total > item->length)
+ total -= item->length;
+ else
+ total = 0;
+ xfree (item->plaintext);
+ xfree (item);
+ if (total > MAX_CACHESIZE)
+ goto again;
+ break;
+ }
+}
+
+
/* Put the BODY of a message into the cache. BODY should be a
malloced string, UTF8 encoded. If TRANSFER is given as true, the
ownership of the malloced memory for BODY is transferred to this
@@ -226,7 +269,7 @@
if (!lock_cache ())
{
- /* FIXME: Decide whether to kick out some entries. */
+ flush_if_needed (item->length);
item->next = the_cache;
the_cache = item;
unlock_cache ();
@@ -334,8 +377,10 @@
__func__, item);
else
item->ref--;
- /* Fixme: check whether this one has been scheduled for
- removal. */
+ /* We could here check whether this one has been
+ scheduled for removal. However, I don't think this
+ is really required, we just wait for the next new
+ message which will then remove all pending ones. */
break;
}
}
Modified: trunk/src/olflange.cpp
===================================================================
--- trunk/src/olflange.cpp 2005-09-19 10:00:26 UTC (rev 99)
+++ trunk/src/olflange.cpp 2005-09-19 16:47:55 UTC (rev 100)
@@ -468,7 +468,8 @@
if (!g_initdll)
{
- watcher_init_hook ();
+ if (opt.compat.auto_decrypt)
+ watcher_init_hook ();
read_options ();
op_init ();
g_initdll = TRUE;
@@ -922,7 +923,7 @@
}
-/* Called by Echange to install commands and toolbar buttons. Returns
+/* Called by Exchange to install commands and toolbar buttons. Returns
S_FALSE to signal Exchange to continue calling extensions. */
STDMETHODIMP
CGPGExchExtCommands::InstallCommands (
@@ -1081,7 +1082,8 @@
HWND hwndToolbar = NULL;
CHAR szBuffer[128];
- watcher_set_callback_ctx ((void *)pEECB);
+ if (opt.compat.auto_decrypt)
+ watcher_set_callback_ctx ((void *)pEECB);
pEECB->GetMenuPos (EECMDID_ToolsCustomizeToolbar, &hMenuTools,
NULL, NULL, 0);
AppendMenu (hMenuTools, MF_SEPARATOR, 0, NULL);
Modified: trunk/src/passcache.c
===================================================================
--- trunk/src/passcache.c 2005-09-19 10:00:26 UTC (rev 99)
+++ trunk/src/passcache.c 2005-09-19 16:47:55 UTC (rev 100)
@@ -103,7 +103,7 @@
/* This is routine is used to remove all deleted entries from the
linked list. Deleted entries are marked by a value of NULL. Note,
- that this routibne must be called in a locked state. */
+ that this routine must be called in a locked state. */
static void
remove_deleted_items (void)
{
More information about the Gnupg-commits
mailing list