From: Guilherme Maciel Ferreira Date: Wed, 28 Mar 2012 02:11:03 +0000 (-0300) Subject: Changed the network interface rules, the correct behavior is for each host X-Git-Tag: v1.6~6 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=27c5a2bea69376d0bc70d5e242106644fe24c42b;p=pingcheck Changed the network interface rules, the correct behavior is for each host that has its source-network-interface equal to "default" (e.g. source-network-interface=default) is supposed to use the global default-source-network-interface item. --- diff --git a/src/main.cpp b/src/main.cpp index 5a92c82..6f0b9e5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -123,9 +123,9 @@ void init_pingers( string destination_address = host->get_address(); uint16_t destination_port = host->get_port(); string host_network_interface = host->get_source_network_interface(); - string network_interface = ( default_network_interface.empty() ) ? - host_network_interface : - default_network_interface; + string network_interface = ( host_network_interface == "default" ) ? + default_network_interface : + host_network_interface; PingProtocolList protocol_list = host->get_ping_protocol_list(); int ping_interval_in_sec = host->get_interval_in_sec(); PingSchedulerItem scheduler(