From cdeaa6e0f64b7a417097d5a419640d742f642d06 Mon Sep 17 00:00:00 2001 From: Satheesh Jayakumar Date: Thu, 29 Aug 2013 14:53:55 -0700 Subject: [PATCH] Fixes a bug in sessionCheck() for all adapters Changes to ensure the code breaks out of the adapter session check loop once any one of them is in session. Change-Id: I73b3a5f4954050abf5ce3d4c5a04245c894725f2 CRs-Fixed: 534811 --- core/LocApiBase.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/LocApiBase.cpp b/core/LocApiBase.cpp index 3dad37db..6ba72f9e 100644 --- a/core/LocApiBase.cpp +++ b/core/LocApiBase.cpp @@ -123,7 +123,11 @@ bool LocApiBase::isInSession() { bool inSession = false; - TO_ALL_LOCADAPTERS(inSession = mLocAdapters[i]->isInSession()); + for (int i = 0; + !inSession && i < MAX_ADAPTERS && NULL != mLocAdapters[i]; + i++) { + inSession = mLocAdapters[i]->isInSession(); + } return inSession; }