[PATCH v2 12/14] qmi: debug print fd that QRTR data was received on

Denis Kenzior <[email protected]>
Newsgroups dev.linux.lists.ofono
Message-ID <[email protected]>
Similarly to qrtr_service_family_dedicated_rx(), output the fd for the
rx operation.
---
 drivers/qmimodem/qmi.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/qmimodem/qmi.c b/drivers/qmimodem/qmi.c
index 24d2ff8075fe..b8f46a5b4a0e 100644
--- a/drivers/qmimodem/qmi.c
+++ b/drivers/qmimodem/qmi.c
@@ -1848,13 +1848,13 @@ static bool qrtr_received_data(struct l_io *io, void *user_data)
 	unsigned char buf[2048];
 	ssize_t bytes_read;
 	socklen_t addr_size;
+	int fd = l_io_get_fd(qrtr->transport.io);
 
 	addr_size = sizeof(addr);
-	bytes_read = recvfrom(l_io_get_fd(qrtr->transport.io),
-				buf, sizeof(buf), 0,
+	bytes_read = recvfrom(fd, buf, sizeof(buf), 0,
 				(struct sockaddr *) &addr, &addr_size);
-	DEBUG(debug, "Received %zd bytes from Node: %d Port: %d",
-			bytes_read, addr.sq_node, addr.sq_port);
+	DEBUG(debug, "fd %d Received %zd bytes from Node: %d Port: %d",
+			fd, bytes_read, addr.sq_node, addr.sq_port);
 
 	if (bytes_read < 0)
 		return true;
-- 
2.45.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.