aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2019-12-04 19:35:50 +0100
committerToni Uhlig <matzeton@googlemail.com>2019-12-04 19:40:10 +0100
commita3d99b2774bb37061f247535945573bd0f218230 (patch)
tree2966f64dda18618aa110bc4eee7925b2d4e9179a
parenteb00e46daf4c41764c005fc35245a67d116d3aae (diff)
log at least an info message if our receive window is not big enough
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
-rw-r--r--src/pkt.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/pkt.c b/src/pkt.c
index 485ed72..11570f0 100644
--- a/src/pkt.c
+++ b/src/pkt.c
@@ -416,8 +416,9 @@ void handle_data(icmp_echo_packet_t *pkt, int total_len, proxy_desc_t *cur, int
pos = (cur->recv_idx + d) % cur->window_size;
}
}
- else if (cur->window_size && d < cur->window_size)
+ else if (cur->window_size && d < cur->window_size) {
pos = (cur->recv_idx + d) % cur->window_size;
+ }
if (pos != -1) {
if (!cur->recv_ring[pos]) {
@@ -428,9 +429,9 @@ void handle_data(icmp_echo_packet_t *pkt, int total_len, proxy_desc_t *cur, int
cur->recv_wait_send++;
}
}
- /* else
- * pt_log(kLog_debug, "Packet discarded - outside receive window.\n");
- */
+ else {
+ pt_log(kLog_info, "Packet discarded - outside receive window.\n");
+ }
}
}