Skip to content
Open
Changes from all 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
6 changes: 6 additions & 0 deletions src/dyn_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,12 @@ void req_forward_error(struct context *ctx, struct conn *conn, struct msg *req,
// This response gets dropped in rsp_make_error anyways. But since this is
// an error path its ok with the overhead.
struct msg *rsp = msg_get_error(conn, dyn_error_code, error_code);
if (rsp == NULL) {
// TODO: It's not clear how the peer should behave if we hit this error
// condition. Return an appropriate error instead.
log_warn("Could not allocate msg for notifying an error to peer");
return;
}
rsp->peer = req;
// TODO: Check if this is required in response
rsp->dmsg = dmsg_get();
Expand Down