Skip to content

Commit b21d1c8

Browse files
committed
Fix idle.time.1 - Properly handle truncated connections
1 parent b6b62ea commit b21d1c8

File tree

5 files changed

+24
-18
lines changed

5 files changed

+24
-18
lines changed

main/configure

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.71 for justniffer 0.6.8.
3+
# Generated by GNU Autoconf 2.71 for justniffer 0.6.9.
44
#
55
# Report bugs to <info@plecno.com>.
66
#
@@ -623,8 +623,8 @@ MAKEFLAGS=
623623
# Identity of this package.
624624
PACKAGE_NAME='justniffer'
625625
PACKAGE_TARNAME='justniffer'
626-
PACKAGE_VERSION='0.6.8'
627-
PACKAGE_STRING='justniffer 0.6.8'
626+
PACKAGE_VERSION='0.6.9'
627+
PACKAGE_STRING='justniffer 0.6.9'
628628
PACKAGE_BUGREPORT='info@plecno.com'
629629
PACKAGE_URL=''
630630

@@ -1400,7 +1400,7 @@ if test "$ac_init_help" = "long"; then
14001400
# Omit some internal or obsolete options to make the list less imposing.
14011401
# This message is too long to be a string in the A/UX 3.1 sh.
14021402
cat <<_ACEOF
1403-
\`configure' configures justniffer 0.6.8 to adapt to many kinds of systems.
1403+
\`configure' configures justniffer 0.6.9 to adapt to many kinds of systems.
14041404

14051405
Usage: $0 [OPTION]... [VAR=VALUE]...
14061406

@@ -1471,7 +1471,7 @@ fi
14711471

14721472
if test -n "$ac_init_help"; then
14731473
case $ac_init_help in
1474-
short | recursive ) echo "Configuration of justniffer 0.6.8:";;
1474+
short | recursive ) echo "Configuration of justniffer 0.6.9:";;
14751475
esac
14761476
cat <<\_ACEOF
14771477

@@ -1626,7 +1626,7 @@ fi
16261626
test -n "$ac_init_help" && exit $ac_status
16271627
if $ac_init_version; then
16281628
cat <<\_ACEOF
1629-
justniffer configure 0.6.8
1629+
justniffer configure 0.6.9
16301630
generated by GNU Autoconf 2.71
16311631

16321632
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2065,7 +2065,7 @@ cat >config.log <<_ACEOF
20652065
This file contains any messages produced by compilers while
20662066
running configure, to aid debugging if configure makes a mistake.
20672067

2068-
It was created by justniffer $as_me 0.6.8, which was
2068+
It was created by justniffer $as_me 0.6.9, which was
20692069
generated by GNU Autoconf 2.71. Invocation command line was
20702070

20712071
$ $0$ac_configure_args_raw
@@ -3557,7 +3557,7 @@ fi
35573557

35583558
# Define the identity of the package.
35593559
PACKAGE='justniffer'
3560-
VERSION='0.6.8'
3560+
VERSION='0.6.9'
35613561

35623562

35633563
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -20217,7 +20217,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
2021720217
# report actual input values of CONFIG_FILES etc. instead of their
2021820218
# values after options handling.
2021920219
ac_log="
20220-
This file was extended by justniffer $as_me 0.6.8, which was
20220+
This file was extended by justniffer $as_me 0.6.9, which was
2022120221
generated by GNU Autoconf 2.71. Invocation command line was
2022220222

2022320223
CONFIG_FILES = $CONFIG_FILES
@@ -20285,7 +20285,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
2028520285
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
2028620286
ac_cs_config='$ac_cs_config_escaped'
2028720287
ac_cs_version="\\
20288-
justniffer config.status 0.6.8
20288+
justniffer config.status 0.6.9
2028920289
configured by $0, generated by GNU Autoconf 2.71,
2029020290
with options \\"\$ac_cs_config\\"
2029120291

main/configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ dnl
1010

1111
AC_PREREQ([2.71])
1212
AC_COPYRIGHT([2007-2025 (c) Plecno s.r.l]) # Use [] for strings with special chars like ()
13-
AC_INIT([justniffer],[0.6.8],[info@plecno.com])
13+
AC_INIT([justniffer],[0.6.9],[info@plecno.com])
1414
AC_DEFINE([JUSTNIFFER_VERSION], [PACKAGE_VERSION], [justniffer version])
1515
AC_DEFINE([JUSTNIFFER_YEAR], ["2025"], [justniffer year])
1616
#AC_CONFIG_MACRO_DIR([included])

main/debian/changelog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
justniffer (0.6.9.jammy) jammy; urgency=low
2+
* Fix idle.time.1 - Properly handle truncated connections.
3+
4+
-- Oreste Notelli <oreste.notelli@gmail.com> Mon, 11 Jun 2025 20:45:00 +0200
5+
16
justniffer (0.6.8.noble) noble; urgency=low
27
* default concurrent streams to 16384, libnids updates for new gcc version
38

main/include/config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
#define PACKAGE_NAME "justniffer"
9393

9494
/* Define to the full name and version of this package. */
95-
#define PACKAGE_STRING "justniffer 0.6.8"
95+
#define PACKAGE_STRING "justniffer 0.6.9"
9696

9797
/* Define to the one symbol short name of this package. */
9898
#define PACKAGE_TARNAME "justniffer"
@@ -101,7 +101,7 @@
101101
#define PACKAGE_URL ""
102102

103103
/* Define to the version of this package. */
104-
#define PACKAGE_VERSION "0.6.8"
104+
#define PACKAGE_VERSION "0.6.9"
105105

106106
/* Define to 1 if all of the C90 standard headers exist (not just the ones
107107
required in a freestanding environment). This macro is provided for
@@ -112,7 +112,7 @@
112112
/* #undef TM_IN_SYS_TIME */
113113

114114
/* Version number of package */
115-
#define VERSION "0.6.8"
115+
#define VERSION "0.6.9"
116116

117117
/* Define to empty if `const' does not conform to ANSI C. */
118118
/* #undef const */

main/src/formatter.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,11 +1112,12 @@ class idle_time_2 : public basic_handler
11121112
}
11131113
virtual void append(std::basic_ostream<char> &out, const timeval *t, connections_container *pconnections_container)
11141114
{
1115-
t2 = *t;
1116-
if (response)
1115+
if (t && response) {
1116+
t2 = *t;
11171117
out << to_double(t2 - t1);
1118-
else
1118+
} else {
11191119
out << _not_found;
1120+
}
11201121
}
11211122
virtual void onResponse(tcp_stream *pstream, const timeval *t)
11221123
{
@@ -1148,7 +1149,7 @@ class idle_time_1 : public basic_handler
11481149
t1 = *t;
11491150
open = true;
11501151
}
1151-
virtual void append(std::basic_ostream<char> &out, const timeval *t, connections_container *pconnections_container)
1152+
virtual void append(std::basic_ostream<char> &out, const timeval *, connections_container *pconnections_container)
11521153
{
11531154
if (open && request)
11541155
out << to_double(t2 - t1);

0 commit comments

Comments
 (0)