summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortastytea2020-01-28 08:11:56 +0100
committertastytea2020-01-28 08:11:56 +0100
commit185ab919784d7646d114e04bce187f60a7094e6d (patch)
treea83c0d2aed6be2e8a868d9deaec9faade530ee37
parentcdd7a465d225de631c72f5cf9bf11f026e4ca286 (diff)
downloadmastodonpp-185ab919784d7646d114e04bce187f60a7094e6d.tar
mastodonpp-185ab919784d7646d114e04bce187f60a7094e6d.tar.gz
mastodonpp-185ab919784d7646d114e04bce187f60a7094e6d.zip
Rename buffer_mutex → _buffer_mutex.
-rw-r--r--include/curl_wrapper.hpp2
-rw-r--r--src/connection.cpp8
-rw-r--r--src/curl_wrapper.cpp4
3 files changed, 7 insertions, 7 deletions
diff --git a/include/curl_wrapper.hpp b/include/curl_wrapper.hpp
index 7674478..9fec3b6 100644
--- a/include/curl_wrapper.hpp
+++ b/include/curl_wrapper.hpp
@@ -172,7 +172,7 @@ protected:
*
* @since 0.1.0
*/
- mutex buffer_mutex;
+ mutex _buffer_mutex;
/*!
* @brief Make a HTTP request.
diff --git a/src/connection.cpp b/src/connection.cpp
index 1b19833..81297ce 100644
--- a/src/connection.cpp
+++ b/src/connection.cpp
@@ -68,17 +68,17 @@ answer_type Connection::del(const endpoint_variant &endpoint,
string Connection::get_new_stream_contents()
{
- buffer_mutex.lock();
+ _buffer_mutex.lock();
auto &buffer{get_buffer()};
const string buffer_copy{buffer};
buffer.clear();
- buffer_mutex.unlock();
+ _buffer_mutex.unlock();
return buffer_copy;
}
vector<event_type> Connection::get_new_events()
{
- buffer_mutex.lock();
+ _buffer_mutex.lock();
auto &buffer{get_buffer()};
vector<event_type> events;
@@ -103,7 +103,7 @@ vector<event_type> Connection::get_new_events()
buffer.erase(0, endpos);
}
- buffer_mutex.unlock();
+ _buffer_mutex.unlock();
return events;
}
diff --git a/src/curl_wrapper.cpp b/src/curl_wrapper.cpp
index 97c519d..bfa59ee 100644
--- a/src/curl_wrapper.cpp
+++ b/src/curl_wrapper.cpp
@@ -280,9 +280,9 @@ size_t CURLWrapper::writer_body(char *data, size_t size, size_t nmemb)
return 0;
}
- buffer_mutex.lock();
+ _buffer_mutex.lock();
_curl_buffer_body.append(data, size * nmemb);
- buffer_mutex.unlock();
+ _buffer_mutex.unlock();
return size * nmemb;
}