[git] GpgOL - branch, master, updated. gpgol-2.3.1-7-g0ab051a

by Andre Heinecke cvs at cvs.gnupg.org
Wed Oct 24 12:59:05 CEST 2018


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  0ab051af6406cb877200f651ca23ebf1ead6482a (commit)
       via  ffeeda76a797633952370cc3c10548229042536f (commit)
      from  a9f1c04e2933ca8f3dbdfda546bc191383f6d5a3 (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 0ab051af6406cb877200f651ca23ebf1ead6482a
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Wed Oct 24 12:53:05 2018 +0200

    Add temporary logging to readRegStr
    
    * src/common.cpp (readRegStr): Add temporary verbose logging.
    
    --
    This will be reverted after a little beta release to debug
    an on site issue.

diff --git a/src/common.cpp b/src/common.cpp
index 72fa16f..ef232b4 100644
--- a/src/common.cpp
+++ b/src/common.cpp
@@ -108,6 +108,15 @@ get_root_key(const char *root)
   return root_key;
 }
 
+const char *nullguard (const char *str)
+{
+  if (str)
+    {
+      return str;
+    }
+  return "null";
+}
+
 static std::string
 readRegStr (const char *root, const char *dir, const char *name)
 {
@@ -120,34 +129,47 @@ readRegStr (const char *root, const char *dir, const char *name)
     DWORD n1, nbytes, type;
     std::string ret;
 
+    log_debug ("Read reg str root: '%s', '%s', '%s'",
+               nullguard(root), nullguard(dir), nullguard(name));
+
     if (!(root_key = get_root_key(root))) {
+        log_debug("Failed to get root key");
         return ret;
     }
 
     if (RegOpenKeyExA(root_key, dir, 0, KEY_READ, &key_handle)) {
+        log_debug("Failed to open root");
         if (root) {
+            log_debug("Failed to open root with forced root");
             /* no need for a RegClose, so return direct */
             return ret;
         }
         /* Fallback to HKLM */
 
+        log_debug("Fallback to HKLM");
         if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, dir, 0, KEY_READ, &key_handle)) {
+            log_debug("HKLM open failed");
             return ret;
         }
     }
 
     nbytes = 1;
     if (RegQueryValueExA(key_handle, name, 0, nullptr, nullptr, &nbytes)) {
+        log_debug("Query Value failed");
         if (root) {
+            log_debug("Forced root: bail!");
             RegCloseKey (key_handle);
             return ret;
         }
         /* Try to fallback to HKLM also vor a missing value.  */
+        log_debug("HKLM Value fallback!");
         RegCloseKey (key_handle);
         if (RegOpenKeyExA (HKEY_LOCAL_MACHINE, dir, 0, KEY_READ, &key_handle)) {
+            log_debug("Failed to open key");
             return ret;
         }
         if (RegQueryValueExA(key_handle, name, 0, nullptr, nullptr, &nbytes)) {
+            log_debug("Failed to open fallback value for %s", nullguard(name));
             RegCloseKey(key_handle);
             return ret;
         }
@@ -155,6 +177,7 @@ readRegStr (const char *root, const char *dir, const char *name)
     n1 = nbytes+1;
     char result[n1];
     if (RegQueryValueExA(key_handle, name, 0, &type, (LPBYTE)result, &n1)) {
+        log_debug ("Query Value real failed");
         RegCloseKey(key_handle);
         return ret;
     }
@@ -181,6 +204,7 @@ readRegStr (const char *root, const char *dir, const char *name)
             ret = tmp;
         }
     }
+    log_debug ("returning: %s", ret.c_str ());
     return ret;
 #endif
 }

commit ffeeda76a797633952370cc3c10548229042536f
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Wed Oct 24 12:51:26 2018 +0200

    Pseudonym some more without DBG_DATA
    
    * src/oomhelp.cpp (get_sender_SentRepresentingAddress):
    anonstr.
    * src/mimemaker.cpp (write_part): Anonstr filename.

diff --git a/src/mimemaker.cpp b/src/mimemaker.cpp
index 7adb25b..acec070 100644
--- a/src/mimemaker.cpp
+++ b/src/mimemaker.cpp
@@ -901,7 +901,7 @@ write_part (sink_t sink, const char *data, size_t datalen,
 
   log_debug ("Writing part of length %d%s filename=`%s'\n",
              (int)datalen, is_mapibody? " (body)":"",
-             filename?filename:"[none]");
+             filename ? anonstr (filename) : "[none]");
 
   ct = infer_content_type (data, datalen, filename, is_mapibody, &use_b64);
   use_qp = 0;
diff --git a/src/oomhelp.cpp b/src/oomhelp.cpp
index b859cb7..9ac1083 100644
--- a/src/oomhelp.cpp
+++ b/src/oomhelp.cpp
@@ -2522,7 +2522,7 @@ get_sender_SentRepresentingAddress (LPDISPATCH mailitem)
   if (buf && strlen (buf))
     {
       log_debug ("%s:%s Found sent representing address \"%s\"",
-                 SRCNAME, __func__, buf);
+                 SRCNAME, __func__, anonstr (buf));
       TRETURN buf;
     }
   xfree (buf);

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

Summary of changes:
 src/common.cpp    | 24 ++++++++++++++++++++++++
 src/mimemaker.cpp |  2 +-
 src/oomhelp.cpp   |  2 +-
 3 files changed, 26 insertions(+), 2 deletions(-)


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




More information about the Gnupg-commits mailing list