mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 09:15:15 +02:00
Added the handling of agent's address list at new_agent/update_agent API call.
This commit is contained in:
parent
b7681c23c8
commit
517cf4c1a3
@ -1061,7 +1061,12 @@ function api_set_update_agent($id_agent, $thrash2, $other, $thrash3) {
|
|||||||
'id_parent' => $idParent,
|
'id_parent' => $idParent,
|
||||||
'custom_id' => $customId),
|
'custom_id' => $customId),
|
||||||
array('id_agente' => $id_agent));
|
array('id_agente' => $id_agent));
|
||||||
|
|
||||||
|
if ( $return && !empty($ip)) {
|
||||||
|
// register ip for this agent in 'taddress'
|
||||||
|
agents_add_address ($id_agent, $ip);
|
||||||
|
}
|
||||||
|
|
||||||
returnData('string',
|
returnData('string',
|
||||||
array('type' => 'string', 'data' => (int)((bool)$return)));
|
array('type' => 'string', 'data' => (int)((bool)$return)));
|
||||||
}
|
}
|
||||||
@ -1154,7 +1159,12 @@ function api_set_new_agent($thrash1, $thrash2, $other, $thrash3) {
|
|||||||
'server_name' => $nameServer,
|
'server_name' => $nameServer,
|
||||||
'id_parent' => $idParent,
|
'id_parent' => $idParent,
|
||||||
'custom_id' => $customId));
|
'custom_id' => $customId));
|
||||||
|
|
||||||
|
if (!empty($idAgente) && !empty($ip)) {
|
||||||
|
// register ip for this agent in 'taddress'
|
||||||
|
agents_add_address ($idAgente, $ip);
|
||||||
|
}
|
||||||
|
|
||||||
returnData('string',
|
returnData('string',
|
||||||
array('type' => 'string', 'data' => $idAgente));
|
array('type' => 'string', 'data' => $idAgente));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user