Skip to content

Commit

Permalink
pw_rpc: Use PW_ASSERT in header, not PW_DCHECK
Browse files Browse the repository at this point in the history
This fixes an issue where RPC headers would include log.h before sources
had set the log module name.

Change-Id: I3b3d9fb937491fdded609aac08403e0708402409
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/93723
Pigweed-Auto-Submit: Scott James Remnant <keybuk@google.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
  • Loading branch information
keybuk authored and CQ Bot Account committed May 5, 2022
1 parent 5a3cff0 commit 49a00b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pw_rpc/pwpb/public/pw_rpc/pwpb/internal/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include <span>

#include "pw_assert/check.h"
#include "pw_assert/assert.h"
#include "pw_bytes/span.h"
#include "pw_protobuf/encoder.h"
#include "pw_protobuf/internal/codegen.h"
Expand Down Expand Up @@ -144,7 +144,7 @@ void PwpbSendInitialRequest(ClientCall& call,
PwpbSerde serde,
const Request& request)
PW_UNLOCK_FUNCTION(rpc_lock()) {
PW_DCHECK(call.active_locked());
PW_ASSERT(call.active_locked());

Result<ByteSpan> buffer = PwpbEncodeToPayloadBuffer(request, serde);
if (buffer.ok()) {
Expand Down Expand Up @@ -174,7 +174,7 @@ Status PwpbSendFinalResponse(internal::ServerCall& call,
Status status,
PwpbSerde serde)
PW_EXCLUSIVE_LOCKS_REQUIRED(rpc_lock()) {
PW_DCHECK(call.active_locked());
PW_ASSERT(call.active_locked());

Result<ByteSpan> buffer = PwpbEncodeToPayloadBuffer(response, serde);
if (!buffer.ok()) {
Expand Down

0 comments on commit 49a00b3

Please sign in to comment.