Skip to content
This repository has been archived by the owner on Mar 4, 2021. It is now read-only.

Commit

Permalink
Missed one dlopen for CoreLocation
Browse files Browse the repository at this point in the history
  • Loading branch information
spouliot committed Mar 7, 2013
1 parent c696633 commit aca7a38
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions src/CoreLocation/CoreLocation2.cs
Expand Up @@ -29,7 +29,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Runtime.InteropServices;
using MonoMac.ObjCRuntime;

namespace MonoMac.CoreLocation {
Expand All @@ -44,21 +43,16 @@ public partial class CLLocation {

static CLLocation ()
{
var handle = Dlfcn.dlopen (Constants.CoreLocationLibrary, 0);

var handle = Libraries.CoreLocation.Handle;
if (handle == IntPtr.Zero)
return;

try {
AccurracyBestForNavigation = Dlfcn.GetDouble (handle, "kCLLocationAccuracyBestForNavigation");
AccuracyBest = Dlfcn.GetDouble (handle, "kCLLocationAccuracyBest");
AccuracyNearestTenMeters = Dlfcn.GetDouble (handle, "kCLLocationAccuracyNearestTenMeters");
AccuracyHundredMeters = Dlfcn.GetDouble (handle, "kCLLocationAccuracyHundredMeters");
AccuracyKilometer = Dlfcn.GetDouble (handle, "kCLLocationAccuracyKilometer");
AccuracyThreeKilometers = Dlfcn.GetDouble (handle, "kCLLocationAccuracyThreeKilometers");
} finally {
Dlfcn.dlclose (handle);
}
AccurracyBestForNavigation = Dlfcn.GetDouble (handle, "kCLLocationAccuracyBestForNavigation");
AccuracyBest = Dlfcn.GetDouble (handle, "kCLLocationAccuracyBest");
AccuracyNearestTenMeters = Dlfcn.GetDouble (handle, "kCLLocationAccuracyNearestTenMeters");
AccuracyHundredMeters = Dlfcn.GetDouble (handle, "kCLLocationAccuracyHundredMeters");
AccuracyKilometer = Dlfcn.GetDouble (handle, "kCLLocationAccuracyKilometer");
AccuracyThreeKilometers = Dlfcn.GetDouble (handle, "kCLLocationAccuracyThreeKilometers");
}
}
}

0 comments on commit aca7a38

Please sign in to comment.