From 4c4137d9f2c79aa903dff462a68c65b4acab1c2a Mon Sep 17 00:00:00 2001 From: Benjamin Sergeant <“bsergean@gmail.com”> Date: Fri, 19 Apr 2019 09:48:46 -0700 Subject: [PATCH] (ws) fix compiler warnings --- ws/ws_cobra_subscribe.cpp | 5 +++++ ws/ws_cobra_to_statsd.cpp | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ws/ws_cobra_subscribe.cpp b/ws/ws_cobra_subscribe.cpp index 262d7b66..a31dbf62 100644 --- a/ws/ws_cobra_subscribe.cpp +++ b/ws/ws_cobra_subscribe.cpp @@ -39,6 +39,11 @@ namespace ix if (eventType == ix::CobraConnection_EventType_Open) { std::cout << "Subscriber: connected" << std::endl; + + for (auto it : headers) + { + std::cerr << it.first << ": " << it.second << std::endl; + } } else if (eventType == ix::CobraConnection_EventType_Authenticated) { diff --git a/ws/ws_cobra_to_statsd.cpp b/ws/ws_cobra_to_statsd.cpp index 0369355a..02dab361 100644 --- a/ws/ws_cobra_to_statsd.cpp +++ b/ws/ws_cobra_to_statsd.cpp @@ -46,7 +46,6 @@ namespace ix Json::Value val(jsonValue); - int i = 0; while (std::getline(tokenStream, token, '.')) { val = val[token]; @@ -92,6 +91,11 @@ namespace ix if (eventType == ix::CobraConnection_EventType_Open) { std::cout << "Subscriber: connected" << std::endl; + + for (auto it : headers) + { + std::cerr << it.first << ": " << it.second << std::endl; + } } if (eventType == ix::CobraConnection_EventType_Closed) { @@ -101,7 +105,7 @@ namespace ix { std::cout << "Subscriber authenticated" << std::endl; conn.subscribe(channel, - [&jsonWriter, &statsdClient, &channel, + [&jsonWriter, &statsdClient, verbose, &tokens, &prefix, &msgCount] (const Json::Value& msg) {