Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some conversions to use PacketBufferHandle #4011

Merged
merged 6 commits into from
Dec 1, 2020
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/all-clusters-app/esp32/main/EchoServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class EchoServerCallback : public SecureSessionMgrDelegate
ESP_LOGI(TAG, "Client sent: %s", logmsg);

// Attempt to echo back
err = mgr->SendMessage(header.GetSourceNodeId().Value(), buffer.Release_ForNow());
err = mgr->SendMessage(header.GetSourceNodeId().Value(), std::move(buffer));
if (err != CHIP_NO_ERROR)
{
ESP_LOGE(TAG, "Unable to echo back to client: %s", ErrorStr(err));
Expand Down
2 changes: 1 addition & 1 deletion examples/chip-tool/commands/common/EchoCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void EchoCommand::SendEcho() const
memcpy(buffer->Start(), PAYLOAD, payloadLen);
buffer->SetDataLength(static_cast<uint16_t>(payloadLen));

CHIP_ERROR err = mController->SendMessage(NULL, buffer.Release_ForNow());
CHIP_ERROR err = mController->SendMessage(NULL, std::move(buffer));
if (err == CHIP_NO_ERROR)
{
ChipLogProgress(chipTool, "Echo (%s): Message sent to server", GetNetworkName());
Expand Down
2 changes: 1 addition & 1 deletion examples/chip-tool/commands/common/ModelCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ bool ModelCommand::SendCommand(ChipDeviceController * dc)
PrintBuffer(buffer);
#endif

dc->SendMessage(NULL, buffer.Release_ForNow());
dc->SendMessage(NULL, std::move(buffer));
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/util/chip-message-send.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ EmberStatus chipSendUnicast(NodeId destination, EmberApsFrame * apsFrame, uint16
memcpy(buffer->Start() + frameSize, message, messageLength);
buffer->SetDataLength(dataLength);

CHIP_ERROR err = SessionManager().SendMessage(destination, buffer.Release_ForNow());
CHIP_ERROR err = SessionManager().SendMessage(destination, std::move(buffer));
if (err != CHIP_NO_ERROR)
{
// FIXME: Figure out better translations between our error types?
Expand Down
Loading