1.4.10 updates
This commit is contained in:
@@ -25,7 +25,7 @@ void LicenceRequest::handlePacketDisconnect(const std::string& message) {
|
||||
}
|
||||
|
||||
void LicenceRequest::handlePacketHandshake(const std::string& data) {
|
||||
if(this->state != protocol::HANDSCAKE) LICENSE_FERR(this, InvalidResponseException, "Protocol state mismatch");
|
||||
if(this->state != protocol::HANDSCHAKE) LICENSE_FERR(this, InvalidResponseException, "Protocol state mismatch");
|
||||
if(data.length() < 3) LICENSE_FERR(this, InvalidResponseException, "Invalid packet size");
|
||||
|
||||
if((uint8_t) data[0] != 0xAF || (uint8_t) data[1] != 0xFE) LICENSE_FERR(this, InvalidResponseException, "Invalid handshake");
|
||||
@@ -54,14 +54,13 @@ void LicenceRequest::handlePacketHandshake(const std::string& data) {
|
||||
}
|
||||
|
||||
void LicenceRequest::handlePacketLicenseInfo(const std::string& message) {
|
||||
ts::proto::license::LicenseResponse response;
|
||||
ts::proto::license::LicenseResponse response{};
|
||||
if(!response.ParseFromString(message)) LICENSE_FERR(this, InvalidResponseException, "Could not parse response");
|
||||
|
||||
auto result = make_shared<LicenseRequestResponse>();
|
||||
auto licenseInfo = make_shared<LicenseInfo>();
|
||||
if(!response.has_license_info() && this->data->license && response.valid() && response.blacklist().state() == ts::proto::license::VALID) {
|
||||
if(!response.has_license_info() && this->data->license && response.valid() && response.blacklist().state() == ts::proto::license::VALID)
|
||||
LICENSE_FERR(this, InvalidResponseException, "Missing license info");
|
||||
}
|
||||
|
||||
if(this->data->license) {
|
||||
licenseInfo->type = (LicenseType) response.license_info().type();
|
||||
@@ -88,7 +87,11 @@ void LicenceRequest::handlePacketLicenseInfo(const std::string& message) {
|
||||
result->license = licenseInfo;
|
||||
this->response = result;
|
||||
|
||||
ts::proto::license::PropertyUpdateRequest infos;
|
||||
if(response.has_update_pending()) {
|
||||
|
||||
}
|
||||
|
||||
ts::proto::license::PropertyUpdateRequest infos{};
|
||||
infos.set_speach_total(this->data->speach_total);
|
||||
infos.set_speach_dead(this->data->speach_dead);
|
||||
infos.set_speach_online(this->data->speach_online);
|
||||
|
||||
Reference in New Issue
Block a user