Skip to content

Commit

Permalink
utils: ipc: ipa_proxy_worker: Log IPCUnixSocket::send() failures
Browse files Browse the repository at this point in the history
The IPCUnixSocket::send() function may fail, in which case it can be
useful for debugging to log an error message that tells which event was
affected. Do so.

Reported-by: Coverity CID=35483[6-9]
Reported-by: Coverity CID=35484[01]
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
  • Loading branch information
pinchartl committed Aug 17, 2021
1 parent 5b7d16d commit d0d1733
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,10 @@ private:

{{proxy_funcs.serialize_call(method|method_param_inputs, "_message.data()", "_message.fds()")}}

socket_.send(_message.payload());
int _ret = socket_.send(_message.payload());
if (_ret < 0)
LOG({{proxy_worker_name}}, Error)
<< "Sending event {{method.mojom_name}}() failed: " << _ret;

LOG({{proxy_worker_name}}, Debug) << "{{method.mojom_name}} done";
}
Expand Down

0 comments on commit d0d1733

Please sign in to comment.