diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog
index bd4f874d1c..d4e824f749 100644
--- a/pandora_server/ChangeLog
+++ b/pandora_server/ChangeLog
@@ -1,3 +1,11 @@
+2009-10-20  Ramon Novoa  <rnovoa@artica.es>
+
+	* lib/PandoraFMS/SNMPServer.pm: Save as much information as possible if
+	  the trap could not be properly parsed.
+
+	* lib/PandoraFMS/Core.pm: Changed the name of the alert name macro to
+	  avoid conflicts with other macros.
+
 2009-10-20  Sancho Lerena <slerena@artica.es>
 
         * tools.pm, core.pm: Float data with "," will be replace this
diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm
index 2cc278e14a..aa0c8c75ed 100644
--- a/pandora_server/lib/PandoraFMS/Core.pm
+++ b/pandora_server/lib/PandoraFMS/Core.pm
@@ -437,7 +437,7 @@ sub pandora_execute_action ($$$$$$$$) {
 				  _address_ => (defined ($agent)) ? $agent->{'direccion'} : '',
 				  _timestamp_ => strftime ("%Y-%m-%d %H:%M:%S", localtime()),
 				  _data_ => $data,
-  				  _alert_ => $alert->{'name'},
+  				  _alert_name_ => $alert->{'name'},
 				  _alert_description_ => $alert->{'description'},
 				  _alert_threshold_ => $alert->{'time_threshold'},
 				  _alert_times_fired_ => $alert->{'times_fired'},
diff --git a/pandora_server/lib/PandoraFMS/SNMPServer.pm b/pandora_server/lib/PandoraFMS/SNMPServer.pm
index b6c51a4124..4aa7e31fe9 100644
--- a/pandora_server/lib/PandoraFMS/SNMPServer.pm
+++ b/pandora_server/lib/PandoraFMS/SNMPServer.pm
@@ -130,19 +130,13 @@ sub pandora_snmptrapd {
 				my $timestamp = $date . ' ' . $time;
 				$value = limpia_cadena ($value);
 
-				my ($custom_oid, $custom_type, $custom_value) = ('', '', $type_desc);
+				my ($custom_oid, $custom_type, $custom_value) = ('', '', '');
+				($custom_oid, $custom_type, $custom_value) = ($1, $2, limpia_cadena ($3)) if ($data =~ m/([0-9\.]*)\s\=\s([A-Za-z0-9]*)\:\s(.+)/);
 
-				# Custom OID
-				if ($type eq '6') { 	
-						
-					#String data
-					next if ($data =~ m/STRING/) && ($data !~ m/([0-9\.]*)\s\=\s([A-Za-z0-9]*)\:\s\"(.+)\"/);
-
-					next if ($data !~ m/([0-9\.]*)\s\=\s([A-Za-z0-9]*)\:\s(.+)/);
-
-					($custom_oid, $custom_type, $custom_value) = ($1, $2, $3);
-					$custom_value = limpia_cadena ($custom_value);
-				}
+				# Try to save as much information as possible if the trap could not be parsed
+				$oid = $type_desc if ($oid eq '' || $oid eq '.');
+				$custom_value = $type_desc if ($custom_oid eq '' || $custom_oid eq '.');
+				$custom_value = $data if ($custom_value eq '');
 
 				# Insert the trap into the DB
 				if (! defined(enterprise_hook ('snmp_insert_trap', [$pa_config, $source, $oid, $type, $value, $custom_oid, $custom_value, $custom_type, $timestamp, $dbh]))) {