|
|
|
@ -36,7 +36,7 @@ using namespace srslte;
|
|
|
|
|
namespace srsepc{
|
|
|
|
|
|
|
|
|
|
hss* hss::m_instance = NULL;
|
|
|
|
|
boost::mutex hss_instance_mutex;
|
|
|
|
|
pthread_mutex_t hss_instance_mutex = PTHREAD_MUTEX_INITIALIZER;
|
|
|
|
|
|
|
|
|
|
hss::hss()
|
|
|
|
|
// :m_sqn(0x112233445566)
|
|
|
|
@ -54,21 +54,23 @@ hss::~hss()
|
|
|
|
|
hss*
|
|
|
|
|
hss::get_instance(void)
|
|
|
|
|
{
|
|
|
|
|
boost::mutex::scoped_lock lock(hss_instance_mutex);
|
|
|
|
|
pthread_mutex_lock(&hss_instance_mutex);
|
|
|
|
|
if(NULL == m_instance) {
|
|
|
|
|
m_instance = new hss();
|
|
|
|
|
}
|
|
|
|
|
pthread_mutex_unlock(&hss_instance_mutex);
|
|
|
|
|
return(m_instance);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
hss::cleanup(void)
|
|
|
|
|
{
|
|
|
|
|
boost::mutex::scoped_lock lock(hss_instance_mutex);
|
|
|
|
|
pthread_mutex_lock(&hss_instance_mutex);
|
|
|
|
|
if(NULL != m_instance) {
|
|
|
|
|
delete m_instance;
|
|
|
|
|
m_instance = NULL;
|
|
|
|
|
}
|
|
|
|
|
pthread_mutex_unlock(&hss_instance_mutex);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|