[git] GpgOL - branch, master, updated. gpgol-1.2.0-3-g5fd4e57

by Andre Heinecke cvs at cvs.gnupg.org
Thu Jul 24 10:57:04 CEST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG extension for MS Outlook".

The branch, master has been updated
       via  5fd4e5723a8a25576b87c35b228ea596e1dee554 (commit)
      from  d48a6f0a26fd03b760791332a17b12fd7a6110c1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5fd4e5723a8a25576b87c35b228ea596e1dee554
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu Jul 24 10:41:08 2014 +0200

    Fix sender lookup by also using get_pa_string
    
        * src/oomhelp.cpp (get_pa_string): Add debug output.
        (get_oom_recipients): Remove now redundant debug output.
        * src/oomhelp.h (get_pa_string): Declare.
        * src/ribbon-callbacks.cpp (do_composer_action, do_reader_action)
        (attachEncryptedFile): Use get_pa_string to obtain sender.
        * NEWS: Update accordingly

diff --git a/NEWS b/NEWS
index 2b9e3a1..1ac9208 100644
--- a/NEWS
+++ b/NEWS
@@ -1,8 +1,8 @@
 Noteworthy changes for version 1.2.1 (unreleased)
 =================================================
 
- * Fixed recipient lookup problems when using exchange or active
- directory.
+ * Fixed recipient / sender lookup problems when using exchange or
+ active directory.
 
 Noteworthy changes for version 1.2.0 (2013-08-19)
 =================================================
diff --git a/src/oomhelp.cpp b/src/oomhelp.cpp
index 0ac567d..ccc389b 100644
--- a/src/oomhelp.cpp
+++ b/src/oomhelp.cpp
@@ -807,6 +807,9 @@ get_pa_string (LPDISPATCH pDisp, const char *property)
   unsigned int argErr = 0;
   char *result = NULL;
 
+  log_debug ("%s:%s: Looking up property: %s;",
+             SRCNAME, __func__, property);
+
   propertyAccessor = get_oom_object (pDisp, "PropertyAccessor");
   if (!propertyAccessor)
     {
@@ -858,6 +861,8 @@ get_pa_string (LPDISPATCH pDisp, const char *property)
   RELDISP (propertyAccessor);
   VariantClear (&rVariant);
 
+  log_debug ("%s:%s: Lookup result: %s;",
+             SRCNAME, __func__, result);
   return result;
 }
 
@@ -897,15 +902,11 @@ get_oom_recipients (LPDISPATCH recipients)
           char *address,
                *resolved;
           address = get_oom_string (recipient, "Address");
-          log_debug ("%s:%s: Looking up smtp address for %s;",
-                     SRCNAME, __func__, address);
           resolved = get_pa_string (recipient, PR_SMTP_ADDRESS);
           if (resolved)
             {
               xfree (address);
               recipientAddrs[i-1] = resolved;
-              log_debug ("%s:%s: Resolved address is %s;",
-                         SRCNAME, __func__, resolved);
               continue;
             }
           log_debug ("%s:%s: Failed to look up SMTP Address;",
diff --git a/src/oomhelp.h b/src/oomhelp.h
index 1919973..5c11797 100644
--- a/src/oomhelp.h
+++ b/src/oomhelp.h
@@ -131,6 +131,10 @@ char ** get_oom_recipients (LPDISPATCH recipients);
 int
 add_oom_attachment (LPDISPATCH disp, wchar_t* inFile);
 
+/* Look up a string with the propertyAccessor interface */
+char *
+get_pa_string (LPDISPATCH pDisp, const char *property);
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/src/ribbon-callbacks.cpp b/src/ribbon-callbacks.cpp
index 987e46d..e9b7e27 100644
--- a/src/ribbon-callbacks.cpp
+++ b/src/ribbon-callbacks.cpp
@@ -294,7 +294,7 @@ do_composer_action (LPDISPATCH ctrl, int flags)
   engine_set_session_number (filter, session_number);
   engine_set_session_title (filter, _("GpgOL"));
 
-  senderAddr = get_oom_string (sender, "Address");
+  senderAddr = get_pa_string (sender, PR_SMTP_ADDRESS);
 
   if (flags & OP_ENCRYPT)
     {
@@ -691,7 +691,7 @@ do_reader_action (LPDISPATCH ctrl, int flags)
       /* If the message has not been sent we might be composing
          in this case use the current address */
       LPDISPATCH sender = get_oom_object (mailItem, "Session.CurrentUser");
-      senderAddr = get_oom_string (sender, "Address");
+      senderAddr = get_pa_string (sender, PR_SMTP_ADDRESS);
       RELDISP (sender);
     }
 
@@ -1052,7 +1052,7 @@ attachEncryptedFile (LPDISPATCH ctrl, int flags)
       goto failure;
     }
 
-  senderAddr = get_oom_string (sender, "Address");
+  senderAddr = get_pa_string (sender, PR_SMTP_ADDRESS);
 
   curWindow = get_oom_context_window (context);
 

-----------------------------------------------------------------------

Summary of changes:
 NEWS                     |    4 ++--
 src/oomhelp.cpp          |    9 +++++----
 src/oomhelp.h            |    4 ++++
 src/ribbon-callbacks.cpp |    6 +++---
 4 files changed, 14 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
GnuPG extension for MS Outlook
http://git.gnupg.org




More information about the Gnupg-commits mailing list