Revision: 6960
          http://skim-app.svn.sourceforge.net/skim-app/?rev=6960&view=rev
Author:   hofman
Date:     2010-12-11 00:55:30 +0000 (Sat, 11 Dec 2010)

Log Message:
-----------
no need to modify keychain item service and account when we found it

Modified Paths:
--------------
    trunk/SKMainDocument.m

Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m      2010-12-11 00:44:32 UTC (rev 6959)
+++ trunk/SKMainDocument.m      2010-12-11 00:55:30 UTC (rev 6960)
@@ -1795,13 +1795,10 @@
                 passwordData = NULL;
                 
                 passwordData = [password UTF8String];
-                SecKeychainAttribute attrs[] = {
-                    { kSecAccountItemAttr, strlen(userName), (char *)userName 
},
-                    { kSecServiceItemAttr, strlen(serviceName), (char 
*)serviceName },
-                    { kSecCommentItemAttr, comment == NULL ? 0 : 
strlen(comment), (char *)comment } };
-                const SecKeychainAttributeList attributes = { comment == NULL 
? 2 : 3, attrs };
+                SecKeychainAttribute attrs[] = { { kSecCommentItemAttr, 
comment == NULL ? 0 : strlen(comment), (char *)comment } };
+                const SecKeychainAttributeList attributes = { comment == NULL 
? 0 : 1, attrs };
                 
-                err = SecKeychainItemModifyAttributesAndData(itemRef, 
&attributes, strlen(passwordData), passwordData);
+                err = SecKeychainItemModifyAttributesAndData(itemRef, (comment 
== NULL ? NULL : &attributes), strlen(passwordData), passwordData);
             } else if(err == errSecItemNotFound){
                 // password not on keychain, so add it
                 passwordData = [password UTF8String];


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages, 
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev 
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to