ispman/bin ispman-agent,1.74,1.75

Joerg Delker <[email protected]> Sat, 16 Jun 2007 14:28:37 +0000
Newsgroups gmane.comp.isp.ispman.cvs
Message-ID <[email protected]>
Update of /cvsroot/ispman/ispman/bin
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv9148/bin

Modified Files:
	ispman-agent 
Log Message:
fixed bug [ 1603290 ] hanging ispman-agent

Index: ispman-agent
===================================================================
RCS file: /cvsroot/ispman/ispman/bin/ispman-agent,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -d -r1.74 -r1.75
--- ispman-agent	25 Oct 2006 20:47:22 -0000	1.74
+++ ispman-agent	16 Jun 2007 14:28:32 -0000	1.75
@@ -186,13 +186,14 @@
     return ( defined( $jobPriorities{$job} ) ? $jobPriorities{$job} : 100 );
 }
 
+$ispman = ISPMan->new();
+
 while (true) {
-    $ispman = ISPMan->new();
 
-#if  (!$ispman || !$ispman->ldap_ping()){
-#   print "Creating new connection";
-#   $ispman=ISPMan->new() || (print "Could not create an ISPMan instance" && die);
-#}
+    if (!$ispman->ldap_ping()){
+       print "LDAP connection has failed. Reconnecting...";
+       $ispman->{'ldap'}->connect(true);
+    }
 
     $processes = $ispman->getProcessesForHost( \@hostnames );
     my $processHash;


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/