Display negative ack range in qlog
@@ -1021,6 +1021,8 @@ void qlog_ack_frame(uint64_t ftype, FILE * f, bytestream* s)
fprintf(f, ", \"acked_ranges\": [");
for (uint64_t i = 0; i <= num; i++) {
uint64_t skip = 0;
+ int64_t start_range;
+
if (i != 0) {
byteread_vint(s, &skip);
skip++;
@@ -1031,7 +1033,9 @@ void qlog_ack_frame(uint64_t ftype, FILE * f, bytestream* s)
uint64_t range = 0;
byteread_vint(s, &range);
- fprintf(f, "[%"PRIu64", %"PRIu64"]", largest - range, largest);
+ start_range = largest - range;
+ fprintf(f, "[%"PRId64", %"PRIu64"]", start_range, largest);
+
largest -= range + 1;
}
fprintf(f, "]");
