Merge branch 'ent-2763-snmp-traps' into 'develop'

Added recalculate counters when a status module is forced by console

See merge request artica/pandorafms!1794
This commit is contained in:
vgilc 2018-09-28 10:29:14 +02:00
commit d31a2f4cc4
1 changed files with 7 additions and 1 deletions

View File

@ -2687,8 +2687,14 @@ function get_module_realtime_link_graph ($module) {
* with some user action through the console
* @param int New status
* @param int Agent module to force new status
* @param int Agent id to force state recalculations
*/
function force_set_module_status ($status, $id_agent_module) {
function force_set_module_status ($status, $id_agent_module, $id_agent) {
// Force recalculate counters
db_process_sql_update('tagente',
array('update_module_count' => 1),
array('id_agente' => $id_agent)
);
return db_process_sql_update( 'tagente_estado',
array(
'estado' => $status,