Return-Path: X-Original-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7FF24DD55 for ; Tue, 24 Jul 2012 21:44:45 +0000 (UTC) Received: (qmail 92938 invoked by uid 500); 24 Jul 2012 21:44:45 -0000 Delivered-To: apmail-incubator-callback-commits-archive@incubator.apache.org Received: (qmail 92918 invoked by uid 500); 24 Jul 2012 21:44:45 -0000 Mailing-List: contact callback-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-commits@incubator.apache.org Received: (qmail 92910 invoked by uid 99); 24 Jul 2012 21:44:45 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jul 2012 21:44:45 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 0D9C41850C; Tue, 24 Jul 2012 21:44:45 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: hermwong@apache.org To: callback-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: wp7 commit: CB-805 getCurrentHeading returns success only once Message-Id: <20120724214445.0D9C41850C@tyr.zones.apache.org> Date: Tue, 24 Jul 2012 21:44:45 +0000 (UTC) Updated Branches: refs/heads/CB-805 [created] 5373b5ba3 CB-805 getCurrentHeading returns success only once Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/commit/5373b5ba Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/tree/5373b5ba Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/diff/5373b5ba Branch: refs/heads/CB-805 Commit: 5373b5ba334c7ad0aced8bc12637d0cb12ef480a Parents: d04b87a Author: hermwong Authored: Tue Jul 24 14:13:57 2012 -0700 Committer: hermwong Committed: Tue Jul 24 14:14:09 2012 -0700 ---------------------------------------------------------------------- .../standalone/cordovalib/Commands/Compass.cs | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/5373b5ba/templates/standalone/cordovalib/Commands/Compass.cs ---------------------------------------------------------------------- diff --git a/templates/standalone/cordovalib/Commands/Compass.cs b/templates/standalone/cordovalib/Commands/Compass.cs index 7129438..9f8d402 100644 --- a/templates/standalone/cordovalib/Commands/Compass.cs +++ b/templates/standalone/cordovalib/Commands/Compass.cs @@ -165,7 +165,6 @@ namespace WP7CordovaClassLib.Cordova.Commands { if (currentStatus != Running) { - lock (compass) { compass.CurrentValueChanged += compass_SingleHeadingValueChanged; @@ -188,11 +187,11 @@ namespace WP7CordovaClassLib.Cordova.Commands } lock (compass) { - compass.CurrentValueChanged -= compass_SingleHeadingValueChanged; if (watchers.Count < 1) { compass.Stop(); + this.SetStatus(Stopped); } } }