X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/82c15074a03680841318b6a8b934362ee02e9304..ce4f87b0803d81e413699ffe65d5dbf4eec9d64c:/projects/rlm_stg/stg_client.cpp diff --git a/projects/rlm_stg/stg_client.cpp b/projects/rlm_stg/stg_client.cpp index 239770de..e34c50cd 100644 --- a/projects/rlm_stg/stg_client.cpp +++ b/projects/rlm_stg/stg_client.cpp @@ -57,14 +57,12 @@ class Client::Impl pthread_cond_t m_cond; bool m_done; RESULT m_result; - bool m_status; - static bool callback(void* data, const RESULT& result, bool status) + static bool callback(void* data, const RESULT& result) { Impl& impl = *static_cast(data); STG_LOCKER lock(impl.m_mutex); impl.m_result = result; - impl.m_status = status; impl.m_done = true; pthread_cond_signal(&impl.m_cond); return true; @@ -109,7 +107,7 @@ RESULT Client::Impl::request(REQUEST_TYPE type, const std::string& userName, con int res = 0; while (!m_done && res == 0) res = pthread_cond_timedwait(&m_cond, &m_mutex, &ts); - if (res != 0 || !m_status) + if (res != 0) throw Conn::Error("Request failed."); return m_result; }