From: Michael R Sweet Date: Thu, 7 Apr 2016 19:11:42 +0000 (-0400) Subject: Add debug info on failed keychain open. X-Git-Tag: v2.2b1~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fcea7df43cb724b3f8b4b7e257a8b0e37a412a75;p=thirdparty%2Fcups.git Add debug info on failed keychain open. --- diff --git a/cups/tls-darwin.c b/cups/tls-darwin.c index a14b843aa6..c495a6c278 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); }