Skip to content

Commit

Permalink
[coap] fixes in parameter name and in comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
EskoDijk committed Aug 16, 2024
1 parent 93e8381 commit 85d4438
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/core/coap/coap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ Message *CoapBase::InitMessage(Message *aMessage, Type aType, Uri aUri)
return aMessage;
}

Message *CoapBase::InitResponse(Message *aMessage, const Message &aResponse)
Message *CoapBase::InitResponse(Message *aMessage, const Message &aRequest)
{
Error error = kErrorNone;

VerifyOrExit(aMessage != nullptr);

SuccessOrExit(error = aMessage->SetDefaultResponseHeader(aResponse));
SuccessOrExit(error = aMessage->SetDefaultResponseHeader(aRequest));
SuccessOrExit(error = aMessage->SetPayloadMarker());

exit:
Expand Down
2 changes: 1 addition & 1 deletion src/core/coap/coap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ class CoapBase : public InstanceLocator, private NonCopyable
};

Message *InitMessage(Message *aMessage, Type aType, Uri aUri);
Message *InitResponse(Message *aMessage, const Message &aResponse);
Message *InitResponse(Message *aMessage, const Message &aRequest);

static void HandleRetransmissionTimer(Timer &aTimer);
void HandleRetransmissionTimer(void);
Expand Down
4 changes: 2 additions & 2 deletions src/core/coap/coap_message.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ class Message : public ot::Message
bool IsReset(void) const { return (GetType() == kTypeReset); }

/**
* Indicates whether or not the header is a confirmable Put request (i.e, `kTypeConfirmable` with
* Indicates whether or not the header is a confirmable Post request (i.e, `kTypeConfirmable` with
* `kCodePost`).
*
* @retval TRUE Message is a confirmable Post request.
Expand All @@ -787,7 +787,7 @@ class Message : public ot::Message
bool IsConfirmablePostRequest(void) const;

/**
* Indicates whether or not the header is a non-confirmable Put request (i.e, `kTypeNonConfirmable` with
* Indicates whether or not the header is a non-confirmable Post request (i.e, `kTypeNonConfirmable` with
* `kCodePost`).
*
* @retval TRUE Message is a non-confirmable Post request.
Expand Down

0 comments on commit 85d4438

Please sign in to comment.