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 <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>
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 164a4dd..8a88bd4 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 @@
 
 		{{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";
 	}