From 7ffb1f76a5394e227189788e368fe2fdc606bb98 Mon Sep 17 00:00:00 2001 From: slerena Date: Sun, 6 Jul 2008 23:30:02 +0000 Subject: [PATCH] 2008-07-06 Sancho Lerena * pandora_network: Added a patch from godzone-nz, to implement in TCP remote checks a multi-request meth git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@936 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 5 +++++ pandora_server/bin/pandora_network | 13 ++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index ff7a248100..d541fa3f34 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,8 @@ +2008-07-06 Sancho Lerena + + * pandora_network: Added a patch from godzone-nz, to implement + in TCP remote checks a multi-request meth (also in 1.3.1 version). + 2008-07-02 Sancho Lerena * pandora_wmi: Finished first functional version. Uses wmic from diff --git a/pandora_server/bin/pandora_network b/pandora_server/bin/pandora_network index e0fde5635c..a191c255c8 100755 --- a/pandora_server/bin/pandora_network +++ b/pandora_server/bin/pandora_network @@ -372,6 +372,14 @@ sub pandora_query_tcp (%$$$$$$$) { Blocking=>0 ); # Non blocking !!, very important ! if (defined($handle)){ + # Multi request patch, submitted by Glen Eustace (new zealand) + my @tcp_send = split( /\|/, $tcp_send ); + my @tcp_rcv = split( /\|/, $tcp_rcv ); + +next_pair: + $tcp_send = shift( @tcp_send ); + $tcp_rcv = shift( @tcp_rcv ); + if ($tcp_send ne ""){ # its Expected to sending data ? # Send data $handle->autoflush(1); @@ -393,7 +401,10 @@ sub pandora_query_tcp (%$$$$$$$) { } if ($id_tipo_modulo == 9){ # only for TCP Proc if ($temp2 =~ /$tcp_rcv/i){ # String match ! - $$module_data = 1; + if ( @tcp_send ) { # still more pairs + goto next_pair; + } + $$module_data = 1; $$module_result = 0; $counter = $pa_config->{'tcp_checks'}; } else {