diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2020-03-12 16:09:03 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2020-03-12 16:22:46 +0200 |
commit | 56a0f367dff140a1bbd2dc3680c7a645ecf85c18 (patch) | |
tree | fadcaa30c932cad9e5bc26eb52109b1b63a2cb49 /configure.ac | |
parent | 22416a1df87f93f611af1ef419f921ed358a8115 (diff) | |
download | ping903-56a0f367dff140a1bbd2dc3680c7a645ecf85c18.tar.gz ping903-56a0f367dff140a1bbd2dc3680c7a645ecf85c18.tar.bz2 |
Use red-black trees to index the hostlist by the host name and IP address.
This speeds up searches and eliminates the possibility of duplicate
host entries.
* src/rbt.c: New file.
* src/Makefile.am: Add new file.
* src/config.c (file_read_ip_list): Update diagnostic output.
* src/defs.h (LOCAL_IP_LIST_FILE): Rename to MUTABLE_IP_LIST_FILE.
All uses changed.
* src/ping903.c (ping903): Fix the shutting down diagnostic message.
* src/ping903.h: RBT definitions and prototypes.
* src/pinger.c (conf_hostping_tail): Rename to immutable_hostping_tail.
(FOR_EACH_LOCAL_HOSTPING): Rename to FOR_EACH_MUTABLE_HOSTPING.
(save_local_ip_list): Rename to save_mutable_ip_list.
All uses changed.
(host_name_tree, host_addr_tree): New statics.
(pinger_setup): Initialize index trees.
(check_host): Look up both the host name and its IP address.
All uses changed.
(pinger_rbt_insert, pinger_rbt_delete)
(hostping_lookup_by_name, hostping_lookup_by_addr): New functions.
(hostlist_index,hostlist_unindex): New functions.
(pinger_host_add): Insert index entry for the new hostping structure.
(get_hostname_stat): Rewrite using index tree lookup.
(get_host_matches): Likewise.
(hostlist_copy_stat): Likewise.
(hostping_match): Remove.
(p903_update_commit): Update index trees.
(p903_init): Mark all configured hosts as immutable.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 59a2421..001c248 100644 --- a/configure.ac +++ b/configure.ac @@ -15,7 +15,7 @@ # along with Ping903. If not, see <http://www.gnu.org/licenses/>. AC_PREREQ([2.69]) -AC_INIT([Ping903], [0.7], [gray@gnu.org], +AC_INIT([Ping903], [0.7.90], [gray@gnu.org], [ping903], [https://puszcza.gnu.org.ua/projects/ping903/]) AC_CONFIG_SRCDIR([src/main.c]) |