fix unittest compiler warnings
This commit is contained in:
parent
6f76fea188
commit
e7b4a985b4
@ -78,11 +78,11 @@ namespace
|
|||||||
SatoriChat::SatoriChat(const std::string& user,
|
SatoriChat::SatoriChat(const std::string& user,
|
||||||
const std::string& session,
|
const std::string& session,
|
||||||
const std::string& endpoint) :
|
const std::string& endpoint) :
|
||||||
_connectedAndSubscribed(false),
|
|
||||||
_stop(false),
|
|
||||||
_user(user),
|
_user(user),
|
||||||
_session(session),
|
_session(session),
|
||||||
_endpoint(endpoint)
|
_endpoint(endpoint),
|
||||||
|
_stop(false),
|
||||||
|
_connectedAndSubscribed(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -197,7 +197,7 @@ namespace
|
|||||||
[this, channel]
|
[this, channel]
|
||||||
(ix::CobraConnectionEventType eventType,
|
(ix::CobraConnectionEventType eventType,
|
||||||
const std::string& errMsg,
|
const std::string& errMsg,
|
||||||
const ix::WebSocketHttpHeaders& headers,
|
const ix::WebSocketHttpHeaders& /*headers*/,
|
||||||
const std::string& subscriptionId,
|
const std::string& subscriptionId,
|
||||||
CobraConnection::MsgId msgId)
|
CobraConnection::MsgId msgId)
|
||||||
{
|
{
|
||||||
@ -262,11 +262,11 @@ namespace
|
|||||||
_conn.disconnect();
|
_conn.disconnect();
|
||||||
|
|
||||||
_conn.setEventCallback([]
|
_conn.setEventCallback([]
|
||||||
(ix::CobraConnectionEventType eventType,
|
(ix::CobraConnectionEventType /*eventType*/,
|
||||||
const std::string& errMsg,
|
const std::string& /*errMsg*/,
|
||||||
const ix::WebSocketHttpHeaders& headers,
|
const ix::WebSocketHttpHeaders& /*headers*/,
|
||||||
const std::string& subscriptionId,
|
const std::string& /*subscriptionId*/,
|
||||||
CobraConnection::MsgId msgId)
|
CobraConnection::MsgId /*msgId*/)
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
});
|
});
|
||||||
|
@ -29,7 +29,7 @@ namespace
|
|||||||
|
|
||||||
std::atomic<bool> gStop;
|
std::atomic<bool> gStop;
|
||||||
std::atomic<bool> gSubscriberConnectedAndSubscribed;
|
std::atomic<bool> gSubscriberConnectedAndSubscribed;
|
||||||
std::atomic<int> gUniqueMessageIdsCount;
|
std::atomic<size_t> gUniqueMessageIdsCount;
|
||||||
std::atomic<int> gMessageCount;
|
std::atomic<int> gMessageCount;
|
||||||
|
|
||||||
std::set<std::string> gIds;
|
std::set<std::string> gIds;
|
||||||
@ -53,7 +53,7 @@ namespace
|
|||||||
[&conn]
|
[&conn]
|
||||||
(ix::CobraConnectionEventType eventType,
|
(ix::CobraConnectionEventType eventType,
|
||||||
const std::string& errMsg,
|
const std::string& errMsg,
|
||||||
const ix::WebSocketHttpHeaders& headers,
|
const ix::WebSocketHttpHeaders& /*headers*/,
|
||||||
const std::string& subscriptionId,
|
const std::string& subscriptionId,
|
||||||
CobraConnection::MsgId msgId)
|
CobraConnection::MsgId msgId)
|
||||||
{
|
{
|
||||||
@ -61,6 +61,10 @@ namespace
|
|||||||
{
|
{
|
||||||
Logger() << "Subscriber connected:";
|
Logger() << "Subscriber connected:";
|
||||||
}
|
}
|
||||||
|
if (eventType == ix::CobraConnection_EventType_Error)
|
||||||
|
{
|
||||||
|
Logger() << "Subscriber error:" << errMsg;
|
||||||
|
}
|
||||||
else if (eventType == ix::CobraConnection_EventType_Authenticated)
|
else if (eventType == ix::CobraConnection_EventType_Authenticated)
|
||||||
{
|
{
|
||||||
log("Subscriber authenticated");
|
log("Subscriber authenticated");
|
||||||
|
@ -178,11 +178,11 @@ namespace
|
|||||||
{
|
{
|
||||||
// A dev/null server
|
// A dev/null server
|
||||||
server.setOnConnectionCallback(
|
server.setOnConnectionCallback(
|
||||||
[&server, &receivedCloseCode, &receivedCloseReason, &receivedCloseRemote, &mutexWrite](std::shared_ptr<ix::WebSocket> webSocket,
|
[&receivedCloseCode, &receivedCloseReason, &receivedCloseRemote, &mutexWrite](std::shared_ptr<ix::WebSocket> webSocket,
|
||||||
std::shared_ptr<ConnectionState> connectionState)
|
std::shared_ptr<ConnectionState> connectionState)
|
||||||
{
|
{
|
||||||
webSocket->setOnMessageCallback(
|
webSocket->setOnMessageCallback(
|
||||||
[webSocket, connectionState, &server, &receivedCloseCode, &receivedCloseReason, &receivedCloseRemote, &mutexWrite](const ix::WebSocketMessagePtr& msg)
|
[webSocket, connectionState, &receivedCloseCode, &receivedCloseReason, &receivedCloseRemote, &mutexWrite](const ix::WebSocketMessagePtr& msg)
|
||||||
{
|
{
|
||||||
if (msg->type == ix::WebSocketMessageType::Open)
|
if (msg->type == ix::WebSocketMessageType::Open)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user