diff options
author | Arne Schwabe | 2022-04-22 15:40:31 +0200 |
---|---|---|
committer | Gert Doering | 2022-04-22 18:07:06 +0200 |
commit | e21425a7ae7728e16634fd0e8cfba90b48a5309e (patch) | |
tree | 6f461f3991742f92bbfc7fb94734d1e17bf3df3b /src/openvpn/packet_id.c | |
parent | 0fed64a91d894b46105bf7e8b16edea4d90ab70c (diff) | |
download | openvpn-e21425a7ae7728e16634fd0e8cfba90b48a5309e.zip openvpn-e21425a7ae7728e16634fd0e8cfba90b48a5309e.tar.gz |
Remove dead PID_TEST code
Enabling this test produces compile errors and by the looks of it the
test has been broken for many years.
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20220422134038.3801239-3-arne@rfc2549.org>
URL: https://www.mail-archive.com/search?l=mid&q=20220422134038.3801239-3-arne@rfc2549.org
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'src/openvpn/packet_id.c')
-rw-r--r-- | src/openvpn/packet_id.c | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/src/openvpn/packet_id.c b/src/openvpn/packet_id.c index 4943203..e357909 100644 --- a/src/openvpn/packet_id.c +++ b/src/openvpn/packet_id.c @@ -634,59 +634,3 @@ packet_id_debug_print(int msglevel, } #endif /* ifdef ENABLE_DEBUG */ - -#ifdef PID_TEST - -void -packet_id_interactive_test(void) -{ - struct packet_id pid; - struct packet_id_net pin; - bool long_form; - bool count = 0; - bool test; - - const int seq_backtrack = 10; - const int time_backtrack = 10; - - packet_id_init(&pid, seq_backtrack, time_backtrack); - - while (true) - { - char buf[80]; - if (!fgets(buf, sizeof(buf), stdin)) - { - break; - } - update_time(); - if (sscanf(buf, "%lu,%u", &pin.time, &pin.id) == 2) - { - packet_id_reap_test(&pid.rec); - test = packet_id_test(&pid.rec, &pin); - printf("packet_id_test (%" PRIi64 ", " packet_id_format ") returned %d\n", - (int64_t)pin.time, - (packet_id_print_type)pin.id, - test); - if (test) - { - packet_id_add(&pid.rec, &pin); - } - } - else - { - long_form = (count < 20); - packet_id_alloc_outgoing(&pid.send, &pin, long_form); - printf("(%" PRIi64 "(" packet_id_format "), %d)\n", - (int64_t)pin.time, - (packet_id_print_type)pin.id, - long_form); - if (pid.send.id == 10) - { - pid.send.id = 0xFFFFFFF8; - } - ++count; - } - } - packet_id_free(&pid); -} -#endif /* ifdef PID_TEST */ |