From 9260d1b8d51335040eeb8b98627385940fa29f08 Mon Sep 17 00:00:00 2001 From: alexhigh Date: Wed, 6 Aug 2014 18:01:48 +0000 Subject: [PATCH] 2014-08-06 Alejandro Gallardo * lib/PandoraFMS/NetworkServer.pm: Little syntax fix. * util/pandora_revent_create.pl: Changed the url encode separator of the api call from "," to "|". git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10386 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 7 +++++++ pandora_server/lib/PandoraFMS/NetworkServer.pm | 2 +- pandora_server/util/pandora_revent_create.pl | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index fee2d7fd78..c15193a39c 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,10 @@ +2014-08-06 Alejandro Gallardo + + * lib/PandoraFMS/NetworkServer.pm: Little syntax fix. + + * util/pandora_revent_create.pl: Changed the url encode + separator of the api call from "," to "|". + 2014-08-06 Ramon Novoa * lib/PandoraFMS/NetworkServer.pm: Rewrote TCP module socket code for diff --git a/pandora_server/lib/PandoraFMS/NetworkServer.pm b/pandora_server/lib/PandoraFMS/NetworkServer.pm index 90c298e856..52f73184c0 100644 --- a/pandora_server/lib/PandoraFMS/NetworkServer.pm +++ b/pandora_server/lib/PandoraFMS/NetworkServer.pm @@ -356,7 +356,7 @@ sub pandora_query_snmp ($$$) { return (undef, 0) unless ($snmp_oid ne ''); if ($snmp_oid =~ m/[a-zA-Z]/) { - $snmp_oid = translate_obj ($pa_config, $dbh, $snmp_oid, ); + $snmp_oid = translate_obj ($pa_config, $dbh, $snmp_oid); # Could not translate OID, disable the module if (! defined ($snmp_oid) || $snmp_oid eq '') { diff --git a/pandora_server/util/pandora_revent_create.pl b/pandora_server/util/pandora_revent_create.pl index b1bbadd45a..e6a9f13ed2 100644 --- a/pandora_server/util/pandora_revent_create.pl +++ b/pandora_server/util/pandora_revent_create.pl @@ -232,9 +232,9 @@ sub tool_api_main () { $i++; } - $data_event = $event_name.",".$id_group.",".$id_agent.",".$status.",".$id_user.",".$event_type.",".$criticity.",".$id_agent_module.",".$id_alert_am.",".$critical_instructions.",".$warning_instructions.",".$unknown_instructions.",".$user_comment.",".$owner_user.",".$source.",".$tags; + $data_event = $event_name."|".$id_group."|".$id_agent."|".$status."|".$id_user."|".$event_type."|".$criticity."|".$id_agent_module."|".$id_alert_am."|".$critical_instructions."|".$warning_instructions."|".$unknown_instructions."|".$user_comment."|".$owner_user."|".$source."|".$tags; - $call_api = $api_path.'?op=set&op2=create_event&id='.$event_name.'&other='.$data_event.'&other_mode=url_encode_separator_,&apipass='.$api_pass.'&user='.$db_user.'&pass='.$db_pass; + $call_api = $api_path.'?op=set&op2=create_event&id='.$event_name.'&other='.$data_event.'&other_mode=url_encode_separator_|&apipass='.$api_pass.'&user='.$db_user.'&pass='.$db_pass; #DEBUG TRACE#