summaryrefslogtreecommitdiff
path: root/utils/hwstub
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2017-08-28 22:52:45 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2017-08-28 22:52:29 +0200
commite2271ed75e0a59dd63afdc6c1f28ec4cee10a700 (patch)
tree4871c3ec521eb0f65bb00a109dc35b83b0dd75db /utils/hwstub
parent1cd96b4931cfe3a973ae528c505c494735154b11 (diff)
downloadrockbox-e2271ed75e0a59dd63afdc6c1f28ec4cee10a700.tar.gz
rockbox-e2271ed75e0a59dd63afdc6c1f28ec4cee10a700.zip
qeditor: fix compile error and some comments
Change-Id: I157c83fea8173adc53254f15aa49e41ee1ba7549
Diffstat (limited to 'utils/hwstub')
-rw-r--r--utils/hwstub/include/hwstub.hpp5
-rw-r--r--utils/hwstub/lib/hwstub_net.cpp6
2 files changed, 6 insertions, 5 deletions
diff --git a/utils/hwstub/include/hwstub.hpp b/utils/hwstub/include/hwstub.hpp
index e403857200..90b29ebf9d 100644
--- a/utils/hwstub/include/hwstub.hpp
+++ b/utils/hwstub/include/hwstub.hpp
@@ -33,6 +33,7 @@
33#include <mutex> 33#include <mutex>
34#include <condition_variable> 34#include <condition_variable>
35#include <ostream> 35#include <ostream>
36#include <functional>
36 37
37namespace hwstub { 38namespace hwstub {
38 39
@@ -80,7 +81,7 @@ std::string error_string(error err);
80 * 81 *
81 * A context provides a way to regularly poll for derive changes. There are two 82 * A context provides a way to regularly poll for derive changes. There are two
82 * ways to manually force an update: 83 * ways to manually force an update:
83 * - on call to get_device_list(), the list is already refetched 84 * - on call to get_device_list(), the list is always refetched
84 * - on call to update_list() to force list update 85 * - on call to update_list() to force list update
85 * Note that automatic polling is disabled by default. 86 * Note that automatic polling is disabled by default.
86 */ 87 */
@@ -212,7 +213,7 @@ public:
212 std::shared_ptr<context> get_context(); 213 std::shared_ptr<context> get_context();
213 214
214protected: 215protected:
215 /** Some subsystems allow for hardware to be open several times and so do not. 216 /** Some subsystems allow for hardware to be open several times and some do not.
216 * For example, libusb only allows one handle per device. To workaround this issue, 217 * For example, libusb only allows one handle per device. To workaround this issue,
217 * open() will do some magic to allow for several open() even when the hardware 218 * open() will do some magic to allow for several open() even when the hardware
218 * supports only one. If the device does not support multiple 219 * supports only one. If the device does not support multiple
diff --git a/utils/hwstub/lib/hwstub_net.cpp b/utils/hwstub/lib/hwstub_net.cpp
index 1d2fb2402b..e2d9d4b8f2 100644
--- a/utils/hwstub/lib/hwstub_net.cpp
+++ b/utils/hwstub/lib/hwstub_net.cpp
@@ -282,7 +282,7 @@ error context::send_cmd(uint32_t cmd, uint32_t args[HWSTUB_NET_ARGS], uint8_t *s
282 282
283 if(m_state == state::DEAD) 283 if(m_state == state::DEAD)
284 return m_error; 284 return m_error;
285 /* do a delayed init, unless with are doing a HELLO */ 285 /* do a delayed init, unless we are doing a HELLO */
286 if(m_state == state::HELLO && cmd != HWSERVER_HELLO) 286 if(m_state == state::HELLO && cmd != HWSERVER_HELLO)
287 delayed_init(); 287 delayed_init();
288 /* build header */ 288 /* build header */
@@ -452,7 +452,7 @@ void context::delayed_init()
452 452
453void context::stop_context() 453void context::stop_context()
454{ 454{
455 /* make sure with have the lock, this function might be call asynchronously */ 455 /* make sure with have the lock, this function might be called asynchronously */
456 std::unique_lock<std::recursive_mutex> lock(m_mutex); 456 std::unique_lock<std::recursive_mutex> lock(m_mutex);
457 /* if dead, don't do anything */ 457 /* if dead, don't do anything */
458 if(m_state == state::DEAD) 458 if(m_state == state::DEAD)
@@ -942,7 +942,7 @@ void server::client_thread(client_state *state)
942 } 942 }
943 } 943 }
944 debug() << "[net::srv::client] stop: " << state->client << "\n"; 944 debug() << "[net::srv::client] stop: " << state->client << "\n";
945 /* clean client state to avoiding keeping references to objets */ 945 /* clean client state to avoid keeping references to objets */
946 state->dev_map.clear(); 946 state->dev_map.clear();
947 state->handle_map.clear(); 947 state->handle_map.clear();
948 /* kill client */ 948 /* kill client */