From d1fd9d677ee14af93a84f43f31106f7a9f5c565c Mon Sep 17 00:00:00 2001
From: juanmanuelr <noreply@pandorafms.org>
Date: Tue, 22 Nov 2011 11:46:19 +0000
Subject: [PATCH] 2011-11-22 Juan Manuel Ramon <juanmanuel.ramon@artica.es>

	* lib/PandoraFMS/Core.pm: Fixed a problem with keepalive module
	(never goes down).

	Fixed: #3438849



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5149 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
---
 pandora_server/ChangeLog              | 7 +++++++
 pandora_server/lib/PandoraFMS/Core.pm | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog
index 5a9949b845..83290ef2e2 100644
--- a/pandora_server/ChangeLog
+++ b/pandora_server/ChangeLog
@@ -1,3 +1,10 @@
+2011-11-22 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
+
+	* lib/PandoraFMS/Core.pm: Fixed a problem with keepalive module 
+	(never goes down).
+	
+	Fixed: #3438849 
+
 2011-11-21 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
 
 	* lib/PandoraFMS/Core.pm: Changed tag field in events insertion from
diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm
index 712405cc5d..fa068fd5dc 100644
--- a/pandora_server/lib/PandoraFMS/Core.pm
+++ b/pandora_server/lib/PandoraFMS/Core.pm
@@ -1576,7 +1576,7 @@ sub pandora_module_keep_alive_nd {
 					AND tagente.disabled = 0 
 					AND tagente_modulo.id_tipo_modulo = 100 
 					AND tagente_modulo.disabled = 0 
-					AND (' . db_text ('tagente_estado.datos') . ' = \'1\' OR ' . db_text ('tagente_estado.datos') . '= \'\')
+					AND (' . db_text ('tagente_estado.datos') . ' = 1 OR ' . db_text ('tagente_estado.datos') . '= \'\')
 					AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo 
 					AND ( tagente_estado.utimestamp + (tagente.intervalo * 2) < UNIX_TIMESTAMP())');