diff options
author | lloyd <[email protected]> | 2010-09-03 13:55:19 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-09-03 13:55:19 +0000 |
commit | 7e54763ea43c8b34729387c7429922dd981c4f5b (patch) | |
tree | 33a1bd0f32e4ab7958a484e468316291c527dd24 /src/libstate/init.cpp | |
parent | fb68795162b8d107cbd284c4a75d8e13ce589829 (diff) | |
parent | ec8c59af3db02ff159908f9a446e53c4ea20d474 (diff) |
propagate from branch 'net.randombit.botan' (head a29c41b4a949207b1544096c3afab668f8b5179e)
to branch 'net.randombit.botan.c++0x' (head a9d0c2f805b3c20a4c648575d7256959db8329fe)
Diffstat (limited to 'src/libstate/init.cpp')
-rw-r--r-- | src/libstate/init.cpp | 35 |
1 files changed, 3 insertions, 32 deletions
diff --git a/src/libstate/init.cpp b/src/libstate/init.cpp index e2139f42e..5fd476994 100644 --- a/src/libstate/init.cpp +++ b/src/libstate/init.cpp @@ -1,12 +1,11 @@ /* * Default Initialization Function -* (C) 1999-2007 Jack Lloyd +* (C) 1999-2009 Jack Lloyd * * Distributed under the terms of the Botan license */ #include <botan/init.h> -#include <botan/parsing.h> #include <botan/libstate.h> #include <botan/global_state.h> @@ -15,36 +14,8 @@ namespace Botan { /* * Library Initialization */ -void LibraryInitializer::initialize(const std::string& arg_string) +void LibraryInitializer::initialize(const std::string&) { - bool thread_safe = false; - - const std::vector<std::string> arg_list = split_on(arg_string, ' '); - for(u32bit j = 0; j != arg_list.size(); ++j) - { - if(arg_list[j].size() == 0) - continue; - - std::string name, value; - - if(arg_list[j].find('=') == std::string::npos) - { - name = arg_list[j]; - value = "true"; - } - else - { - std::vector<std::string> name_and_value = split_on(arg_list[j], '='); - name = name_and_value[0]; - value = name_and_value[1]; - } - - bool is_on = - (value == "1" || value == "true" || value == "yes" || value == "on"); - - if(name == "thread_safe") - thread_safe = is_on; - } try { @@ -56,7 +27,7 @@ void LibraryInitializer::initialize(const std::string& arg_string) */ Global_State_Management::set_global_state(new Library_State); - global_state().initialize(thread_safe); + global_state().initialize(); } catch(...) { |