pmaports/modem/tqftpserv/0004-tqftpserv-add-rsize-offset-options-to-RRQ-print.patch

36 lines
1,014 B
Diff
Raw Normal View History

From 9febe891d2c98544cea4800561e8f25eb8f1a6a9 Mon Sep 17 00:00:00 2001
From: Luca Weiss <luca.weiss@fairphone.com>
Date: Fri, 19 Jan 2024 14:16:29 +0100
Subject: [PATCH 4/5] tqftpserv: add rsize & offset options to RRQ print
Since new modems send multiple file requests with different rsize and
offset on a single file, it's useful to print those also.
---
tqftpserv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tqftpserv.c b/tqftpserv.c
index b931346..95b4824 100644
--- a/tqftpserv.c
+++ b/tqftpserv.c
@@ -294,14 +294,14 @@ static void handle_rrq(const char *buf, size_t len, struct sockaddr_qrtr *sq)
return;
}
- printf("[TQFTP] RRQ: %s (%s)\n", filename, mode);
-
if (p < buf + len) {
do_oack = true;
parse_options(p, len - (p - buf), &blksize, &tsize, &wsize,
&timeoutms, &rsize, &seek);
}
+ printf("[TQFTP] RRQ: %s (mode=%s rsize=%ld seek=%ld)\n", filename, mode, rsize, seek);
+
sock = qrtr_open(0);
if (sock < 0) {
/* XXX: error */
--
2.44.0