From fcea7df43cb724b3f8b4b7e257a8b0e37a412a75 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Thu, 7 Apr 2016 15:11:42 -0400 Subject: [PATCH] Add debug info on failed keychain open. --- cups/tls-darwin.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cups/tls-darwin.c b/cups/tls-darwin.c index a14b843aa..c495a6c27 100644 --- a/cups/tls-darwin.c +++ b/cups/tls-darwin.c @@ -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); } -- 2.39.5