From 29c5c362880883124d65370c5c8e5b3701282fd2 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 16 Mar 2015 15:48:19 +0100 Subject: [PATCH] sru_z3950: undo Serialize identical SRU GET requests MP-598 Now much more elegantly handled by session_shared. --- src/filter_sru_to_z3950.cpp | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/src/filter_sru_to_z3950.cpp b/src/filter_sru_to_z3950.cpp index 204639e..b383c07 100644 --- a/src/filter_sru_to_z3950.cpp +++ b/src/filter_sru_to_z3950.cpp @@ -68,11 +68,6 @@ namespace metaproxy_1 { typedef std::map ActiveUrlMap; - boost::mutex m_url_mutex; - boost::condition m_cond_url_ready; - ActiveUrlMap m_active_urls; - - boost::mutex m_mutex_session; boost::condition m_cond_session_ready; std::map m_clients; @@ -441,33 +436,7 @@ void yf::SRUtoZ3950::Impl::process(mp::Package &package) if (zgdu_req && zgdu_req->which == Z_GDU_HTTP_Request) { - if (zgdu_req->u.HTTP_Request->content_len == 0) - { - const char *path = zgdu_req->u.HTTP_Request->path; - boost::mutex::scoped_lock lock(m_url_mutex); - while (1) - { - ActiveUrlMap::iterator it = m_active_urls.find(path); - if (it == m_active_urls.end()) - { - m_active_urls[path] = 1; - break; - } - yaz_log(YLOG_LOG, "Waiting for %s to complete", path); - m_cond_url_ready.wait(lock); - } - } sru(package, zgdu_req); - if (zgdu_req && zgdu_req->u.HTTP_Request->content_len == 0) - { - const char *path = zgdu_req->u.HTTP_Request->path; - boost::mutex::scoped_lock lock(m_url_mutex); - - ActiveUrlMap::iterator it = m_active_urls.find(path); - - m_active_urls.erase(it); - m_cond_url_ready.notify_all(); - } } else { -- 1.7.10.4