Skip to content

Commit

Permalink
Fixing gcc build.
Browse files Browse the repository at this point in the history
  • Loading branch information
arobenko committed Jul 22, 2024
1 parent 394f4f0 commit a95ccce
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions client/lib/src/op/SendOp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,7 @@ CC_MqttsnErrorCode SendOp::send(CC_MqttsnPublishCompleteCb cb, void* cbData)
m_registerMsg.field_msgId().setValue(allocPacketId());
}

using QoS = PublishMsg::Field_flags::Field_qos::ValueType;
if (QoS::AtMostOnceDelivery < m_publishMsg.field_flags().field_qos().value()) {
if (Qos::AtMostOnceDelivery < m_publishMsg.field_flags().field_qos().value()) {
m_publishMsg.field_msgId().setValue(allocPacketId());
}

Expand Down Expand Up @@ -267,7 +266,6 @@ void SendOp::handle(PubackMsg& msg)
auto info = CC_MqttsnPublishInfo();
info.m_returnCode = static_cast<decltype(info.m_returnCode)>(msg.field_returnCode().value());

using Qos = PublishMsg::Field_flags::Field_qos::ValueType;
if ((info.m_returnCode == CC_MqttsnReturnCode_Accepted) &&
(m_publishMsg.field_flags().field_qos().value() != Qos::AtLeastOnceDelivery)) {
errorLog("Received PUBACK instead of PUBREC, ignoring...");
Expand All @@ -286,7 +284,6 @@ void SendOp::handle(PubrecMsg& msg)
return;
}

using Qos = PublishMsg::Field_flags::Field_qos::ValueType;
if (m_publishMsg.field_flags().field_qos().value() != Qos::ExactlyOnceDelivery) {
errorLog("Received PUBREC instead of PUBACK, ignoring...");
return;
Expand Down Expand Up @@ -387,8 +384,7 @@ CC_MqttsnErrorCode SendOp::sendInternal_Publish()
return ec;
}

using QoS = PublishMsg::Field_flags::Field_qos::ValueType;
if (QoS::AtMostOnceDelivery == m_publishMsg.field_flags().field_qos().value()) {
if (Qos::AtMostOnceDelivery == m_publishMsg.field_flags().field_qos().value()) {
completeOpInternal(CC_MqttsnAsyncOpStatus_Complete);
return CC_MqttsnErrorCode_Success;
}
Expand Down

0 comments on commit a95ccce

Please sign in to comment.