From 6478ccacb74dd34b22f215f918fa4cbfd6ef5447 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 27 Apr 2021 16:10:07 +0000 Subject: [PATCH] Remove mosqitto code --- UML1/superpoohREST.cpp | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/UML1/superpoohREST.cpp b/UML1/superpoohREST.cpp index 037be6d..ffa740a 100644 --- a/UML1/superpoohREST.cpp +++ b/UML1/superpoohREST.cpp @@ -278,35 +278,6 @@ void handle_signal(int s) cmd = EExit; } -/* -void message_callback(struct mosquitto* mosq, void* obj, const struct mosquitto_message* message) -{ - bool match = 0; - printf("got message '%.*s' for topic '%s'\n", message->payloadlen, (char*)message->payload, message->topic); - - mosquitto_topic_matches_sub("/pooh/height", message->topic, &match); - if (match) { - std::cout << "Going up!" << std::endl; - mtx.lock(); - targetH = std::atof((char*)message->payload); - mtx.unlock(); - } - - mosquitto_topic_matches_sub("/pooh/land", message->topic, &match); - if (match) { - std::cout << "Going down!" << std::endl; - mtx.lock(); - targetH = 0.; - mtx.unlock(); - } - - mosquitto_topic_matches_sub("/pooh/quit", message->topic, &match); - if (match) { - std::cout << "Exiting!" << std::endl; - cmd = EExit; - } -}*/ - bool is_authentificated(http_request message) { auto headers = message.headers(); if (message.headers().find("Authorization") == headers.end()) return false;