[39282] branches/gsoc08-framework/MacPorts_Framework_Release/MPInterpreter. m

armahg at macports.org armahg at macports.org
Fri Aug 15 09:44:46 PDT 2008


Revision: 39282
          http://trac.macosforge.org/projects/macports/changeset/39282
Author:   armahg at macports.org
Date:     2008-08-15 09:44:46 -0700 (Fri, 15 Aug 2008)
Log Message:
-----------
Modifiied -evaluateStringWithMPHelperTool so that it works even if MPMacPorts delegate has not initiated and set an AuthorizationRef for use with the framework.

Modified Paths:
--------------
    branches/gsoc08-framework/MacPorts_Framework_Release/MPInterpreter.m

Modified: branches/gsoc08-framework/MacPorts_Framework_Release/MPInterpreter.m
===================================================================
--- branches/gsoc08-framework/MacPorts_Framework_Release/MPInterpreter.m	2008-08-15 15:55:15 UTC (rev 39281)
+++ branches/gsoc08-framework/MacPorts_Framework_Release/MPInterpreter.m	2008-08-15 16:44:46 UTC (rev 39282)
@@ -420,6 +420,14 @@
 	
 	assert(bundleID != NULL);
 	
+	
+	//In order to make the framework work normally by default ... we do a bare initialization
+	//of internalMacPortsAuthRef if the delegate hasn't iniitialzed it already
+	if (internalMacPortsAuthRef == NULL) {
+		OSStatus res = AuthorizationCreate (NULL, kAuthorizationEmptyEnvironment, kAuthorizationFlagDefaults, &internalMacPortsAuthRef);
+		assert(res == noErr);
+	}
+	
 	BASSetDefaultRules(internalMacPortsAuthRef, 
 					   kMPHelperCommandSet, 
 					   (CFStringRef) bundleID, 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080815/4afbbfd9/attachment.html 


More information about the macports-changes mailing list