aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstate/init.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-10-13 03:25:16 +0000
committerlloyd <[email protected]>2010-10-13 03:25:16 +0000
commitba142ed2eaa21445d49cbbc8ae3b3d4dc625b9d7 (patch)
treebe1a9fa07d0ea26fd7713bb52205f7a3bcc3e907 /src/libstate/init.cpp
parent406d4f8556d41083bfa551e7a777b0cb02925b6c (diff)
parent5913bf42b4c32e43d0db11bf9299130f3b0b62a4 (diff)
propagate from branch 'net.randombit.botan' (head 2898d79f992f27a328a3e41d34b46eb1052da0de)
to branch 'net.randombit.botan.c++0x' (head 6cba76268fd69a73195760c021b7f881b8a6552c)
Diffstat (limited to 'src/libstate/init.cpp')
-rw-r--r--src/libstate/init.cpp35
1 files changed, 3 insertions, 32 deletions
diff --git a/src/libstate/init.cpp b/src/libstate/init.cpp
index 7cdc615bd..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(size_t i = 0; i != arg_list.size(); ++i)
- {
- if(arg_list[i].size() == 0)
- continue;
-
- std::string name, value;
-
- if(arg_list[i].find('=') == std::string::npos)
- {
- name = arg_list[i];
- value = "true";
- }
- else
- {
- std::vector<std::string> name_and_value = split_on(arg_list[i], '=');
- 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(...)
{