diff --git a/services/tunnelbroker/src/Amqp/AmqpManager.h b/services/tunnelbroker/src/Amqp/AmqpManager.h --- a/services/tunnelbroker/src/Amqp/AmqpManager.h +++ b/services/tunnelbroker/src/Amqp/AmqpManager.h @@ -15,7 +15,7 @@ std::unique_ptr amqpChannel; std::atomic amqpReady; - std::atomic lastConnectionTimestamp; + std::atomic lastConnectionTimestamp; void connectInternal(); public: diff --git a/services/tunnelbroker/src/Amqp/AmqpManager.cpp b/services/tunnelbroker/src/Amqp/AmqpManager.cpp --- a/services/tunnelbroker/src/Amqp/AmqpManager.cpp +++ b/services/tunnelbroker/src/Amqp/AmqpManager.cpp @@ -87,7 +87,7 @@ void AmqpManager::connect() { while (true) { - long long currentTimestamp = tools::getCurrentTimestamp(); + int64_t currentTimestamp = tools::getCurrentTimestamp(); if (this->lastConnectionTimestamp && currentTimestamp - this->lastConnectionTimestamp < AMQP_SHORTEST_RECONNECTION_ATTEMPT_INTERVAL) { diff --git a/services/tunnelbroker/src/Constants.h b/services/tunnelbroker/src/Constants.h --- a/services/tunnelbroker/src/Constants.h +++ b/services/tunnelbroker/src/Constants.h @@ -35,7 +35,7 @@ const std::string AMQP_HEADER_FROM_DEVICEID = "fromDeviceid"; const std::string AMQP_HEADER_TO_DEVICEID = "toDeviceid"; -const long long AMQP_SHORTEST_RECONNECTION_ATTEMPT_INTERVAL = +const int64_t AMQP_SHORTEST_RECONNECTION_ATTEMPT_INTERVAL = 1000 * 60; // 1 min // DeviceID diff --git a/services/tunnelbroker/src/Database/DeviceSessionItem.h b/services/tunnelbroker/src/Database/DeviceSessionItem.h --- a/services/tunnelbroker/src/Database/DeviceSessionItem.h +++ b/services/tunnelbroker/src/Database/DeviceSessionItem.h @@ -16,7 +16,7 @@ std::string deviceType; std::string appVersion; std::string deviceOs; - long long checkpointTime = 0; + int64_t checkpointTime = 0; void validate() const override; @@ -40,7 +40,7 @@ std::string getDeviceType() const; std::string getAppVersion() const; std::string getDeviceOs() const; - long long getCheckpointTime() const; + int64_t getCheckpointTime() const; DeviceSessionItem() { } diff --git a/services/tunnelbroker/src/Database/DeviceSessionItem.cpp b/services/tunnelbroker/src/Database/DeviceSessionItem.cpp --- a/services/tunnelbroker/src/Database/DeviceSessionItem.cpp +++ b/services/tunnelbroker/src/Database/DeviceSessionItem.cpp @@ -115,7 +115,7 @@ return this->deviceOs; } -long long DeviceSessionItem::getCheckpointTime() const { +int64_t DeviceSessionItem::getCheckpointTime() const { return this->checkpointTime; } diff --git a/services/tunnelbroker/src/Tools/Tools.h b/services/tunnelbroker/src/Tools/Tools.h --- a/services/tunnelbroker/src/Tools/Tools.h +++ b/services/tunnelbroker/src/Tools/Tools.h @@ -8,7 +8,7 @@ namespace tools { std::string generateRandomString(std::size_t length); -long long getCurrentTimestamp(); +int64_t getCurrentTimestamp(); bool validateDeviceID(std::string deviceID); std::string generateUUID(); bool validateSessionID(std::string sessionID); diff --git a/services/tunnelbroker/src/Tools/Tools.cpp b/services/tunnelbroker/src/Tools/Tools.cpp --- a/services/tunnelbroker/src/Tools/Tools.cpp +++ b/services/tunnelbroker/src/Tools/Tools.cpp @@ -28,7 +28,7 @@ return random_string; } -long long getCurrentTimestamp() { +int64_t getCurrentTimestamp() { using namespace std::chrono; return duration_cast(system_clock::now().time_since_epoch()) .count();