qeditor: fix compile error and some comments

Change-Id: I157c83fea8173adc53254f15aa49e41ee1ba7549
This commit is contained in:
Amaury Pouly 2017-08-28 22:52:45 +02:00
parent 1cd96b4931
commit e2271ed75e
2 changed files with 6 additions and 5 deletions

View file

@ -33,6 +33,7 @@
#include <mutex> #include <mutex>
#include <condition_variable> #include <condition_variable>
#include <ostream> #include <ostream>
#include <functional>
namespace hwstub { namespace hwstub {
@ -80,7 +81,7 @@ std::string error_string(error err);
* *
* A context provides a way to regularly poll for derive changes. There are two * A context provides a way to regularly poll for derive changes. There are two
* ways to manually force an update: * ways to manually force an update:
* - on call to get_device_list(), the list is already refetched * - on call to get_device_list(), the list is always refetched
* - on call to update_list() to force list update * - on call to update_list() to force list update
* Note that automatic polling is disabled by default. * Note that automatic polling is disabled by default.
*/ */
@ -212,7 +213,7 @@ public:
std::shared_ptr<context> get_context(); std::shared_ptr<context> get_context();
protected: protected:
/** Some subsystems allow for hardware to be open several times and so do not. /** Some subsystems allow for hardware to be open several times and some do not.
* For example, libusb only allows one handle per device. To workaround this issue, * For example, libusb only allows one handle per device. To workaround this issue,
* open() will do some magic to allow for several open() even when the hardware * open() will do some magic to allow for several open() even when the hardware
* supports only one. If the device does not support multiple * supports only one. If the device does not support multiple

View file

@ -282,7 +282,7 @@ error context::send_cmd(uint32_t cmd, uint32_t args[HWSTUB_NET_ARGS], uint8_t *s
if(m_state == state::DEAD) if(m_state == state::DEAD)
return m_error; return m_error;
/* do a delayed init, unless with are doing a HELLO */ /* do a delayed init, unless we are doing a HELLO */
if(m_state == state::HELLO && cmd != HWSERVER_HELLO) if(m_state == state::HELLO && cmd != HWSERVER_HELLO)
delayed_init(); delayed_init();
/* build header */ /* build header */
@ -452,7 +452,7 @@ void context::delayed_init()
void context::stop_context() void context::stop_context()
{ {
/* make sure with have the lock, this function might be call asynchronously */ /* make sure with have the lock, this function might be called asynchronously */
std::unique_lock<std::recursive_mutex> lock(m_mutex); std::unique_lock<std::recursive_mutex> lock(m_mutex);
/* if dead, don't do anything */ /* if dead, don't do anything */
if(m_state == state::DEAD) if(m_state == state::DEAD)
@ -942,7 +942,7 @@ void server::client_thread(client_state *state)
} }
} }
debug() << "[net::srv::client] stop: " << state->client << "\n"; debug() << "[net::srv::client] stop: " << state->client << "\n";
/* clean client state to avoiding keeping references to objets */ /* clean client state to avoid keeping references to objets */
state->dev_map.clear(); state->dev_map.clear();
state->handle_map.clear(); state->handle_map.clear();
/* kill client */ /* kill client */