From cdcff2bd44012863c3ea151a0d8f6cedafe24ebb Mon Sep 17 00:00:00 2001 From: Chris Frey Date: Tue, 15 Dec 2009 05:04:45 -0500 Subject: [PATCH] os22: fixed potential bug in loading opensync config If the key value stays in the next loop, it may trigger the "Device" key multiple times, and overwrite the pin with something else. --- opensync-plugin/src/environment.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opensync-plugin/src/environment.cc b/opensync-plugin/src/environment.cc index 44826dc5..719ce785 100644 --- a/opensync-plugin/src/environment.cc +++ b/opensync-plugin/src/environment.cc @@ -309,7 +309,7 @@ void BarryEnvironment::ParseConfig(const char *data, int size) // - sync contacts std::istringstream iss(m_ConfigData); - std::string line, key; + std::string line; while( std::getline(iss, line) ) { if( line[0] == '#' ) @@ -318,6 +318,7 @@ void BarryEnvironment::ParseConfig(const char *data, int size) std::istringstream ils(line); int cal = 0, con = 0; + std::string key; ils >> key; if( key == "DebugMode" ) { -- 2.11.4.GIT