From: Guilherme Maciel Ferreira Date: Wed, 14 Mar 2012 00:22:02 +0000 (-0300) Subject: Use the "host.source-network-interface" only if the global "default-source-network... X-Git-Tag: v1.4~4 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=c8fb53e2d5e734c324d85c5fea1fc2e2a8bddf1a;p=pingcheck Use the "host.source-network-interface" only if the global "default-source-network-interface" is empty. --- diff --git a/src/main.cpp b/src/main.cpp index 24496fc..a29e3b3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -122,6 +122,10 @@ void init_pingers( { string destination_address = host->get_address(); uint16_t destination_port = host->get_port(); + if ( local_interface.empty() ) + { + local_interface = host->get_source_network_interface(); + } PingProtocol protocol = host->get_ping_protocol(); int ping_interval_in_sec = host->get_interval_in_sec(); PingSchedulerItem scheduler(