]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Add debug info on failed keychain open.
authorMichael R Sweet <michaelrsweet@gmail.com>
Thu, 7 Apr 2016 19:11:42 +0000 (15:11 -0400)
committerMichael R Sweet <michaelrsweet@gmail.com>
Thu, 7 Apr 2016 19:11:42 +0000 (15:11 -0400)
cups/tls-darwin.c

index a14b843aa68dcf572f9493709c7925be6228605f..c495a6c278ae66927314785ae8818c45aa61b0b7 100644 (file)
@@ -296,15 +296,16 @@ cupsSetServerCredentials(
 #ifdef HAVE_SECKEYCHAINOPEN
   char                 filename[1024]; /* Filename for keychain */
   SecKeychainRef       keychain = NULL;/* Temporary keychain */
+  OSStatus             status;         /* Status code */
 
 
   if (!path)
     path = http_cdsa_default_path(filename, sizeof(filename));
 
-  if (SecKeychainOpen(path, &keychain) != noErr)
+  if ((status = SecKeychainOpen(path, &keychain)) != noErr)
   {
     /* TODO: Set cups last error string */
-    DEBUG_puts("1cupsSetServerCredentials: Unable to open keychain, returning 0.");
+    DEBUG_printf(("1cupsSetServerCredentials: Unable to open keychain (%d), returning 0.", (int)status));
     return (0);
   }