From d0d1733027c16aa3fe9b7427b4a00a126ebbc6ba Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Tue, 17 Aug 2021 06:09:35 +0300 Subject: utils: ipc: ipa_proxy_worker: Log IPCUnixSocket::send() failures 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 Reviewed-by: Paul Elder Reviewed-by: Umang Jain Reviewed-by: Kieran Bingham --- .../generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'utils/ipc') diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl index 164a4dd6..8a88bd46 100644 --- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl +++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl @@ -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"; } -- cgit v1.2.1