aboutsummaryrefslogtreecommitdiffstats
path: root/modules/eng_aep/aep_conn.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-04-14 21:21:04 +0000
committerlloyd <[email protected]>2008-04-14 21:21:04 +0000
commitb7ad4403eafede60b157cb66228634cd3979a87a (patch)
tree45b040777c5642bbc16c786517ffbf437a76049d /modules/eng_aep/aep_conn.cpp
parent2a5d109a8d35741284a23ef4f87a98cef303ff26 (diff)
Drop eng_aep module (the hardware AEP engine). I still have a card (and driver
sources, etc), but drivers for x86-64/2.6 are not in evidence these days. To test this I would probably have to get a 32-bit machine running ~RH9/2.4 kernel...
Diffstat (limited to 'modules/eng_aep/aep_conn.cpp')
-rw-r--r--modules/eng_aep/aep_conn.cpp87
1 files changed, 0 insertions, 87 deletions
diff --git a/modules/eng_aep/aep_conn.cpp b/modules/eng_aep/aep_conn.cpp
deleted file mode 100644
index 9c48dd837..000000000
--- a/modules/eng_aep/aep_conn.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-/*************************************************
-* AEP Connection Management Source File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
-
-#include <botan/aep_conn.h>
-#include <botan/libstate.h>
-#include <botan/parsing.h>
-#include <botan/hw_aep.h>
-
-namespace Botan {
-
-/*************************************************
-* Persistent connection pool *
-*************************************************/
-std::vector<AEP_Connection::Connection_Info> AEP_Connection::pool;
-
-/*************************************************
-* Close all currently open connections *
-*************************************************/
-void AEP_Connection::close_all_connections()
- {
- Mutex* mutex = global_state().get_named_mutex("aep");
-
- mutex->lock();
- for(u32bit j = 0; j != pool.size(); j++)
- AEP::AEP_CloseConnection(pool[j].id);
- pool.clear();
- mutex->unlock();
- }
-
-/*************************************************
-* Get a new connection handle *
-*************************************************/
-AEP_Connection::AEP_Connection()
- {
- Named_Mutex_Holder lock("aep");
-
- this_connection = 0;
-
- for(u32bit j = 0; j != pool.size(); j++)
- {
- if(pool[j].in_use)
- continue;
-
- pool[j].in_use = true;
- this_connection = pool[j].id;
- }
-
- if(this_connection == 0)
- {
- Connection_Info new_conn;
-
- u32bit retval = AEP::AEP_OpenConnection(&new_conn.id);
- if(retval != 0)
- throw Stream_IO_Error("AEP_OpenConnection failed");
- new_conn.in_use = true;
-
- if(pool.size() < MAX_CACHED_CONNECTIONS)
- pool.push_back(new_conn);
-
- this_connection = new_conn.id;
- }
- }
-
-/*************************************************
-* Free a connection handle *
-*************************************************/
-AEP_Connection::~AEP_Connection()
- {
- Named_Mutex_Holder lock("aep");
-
- for(u32bit j = 0; j != pool.size(); j++)
- {
- if(pool[j].id != this_connection)
- continue;
-
- pool[j].in_use = false;
- return;
- }
-
- int retval = AEP::AEP_CloseConnection(this_connection);
- if(retval != 0)
- throw Exception("AEP_CloseConnection returned " + to_string(retval));
- }
-
-}