changed pandora api functions to include possibility of using agent alias when agent id is accepted as argument
This commit is contained in:
parent
dc3dd1cffa
commit
3a5bbb22bd
File diff suppressed because it is too large
Load Diff
|
@ -57,6 +57,7 @@ our @EXPORT = qw(
|
||||||
get_addr_id
|
get_addr_id
|
||||||
get_agent_addr_id
|
get_agent_addr_id
|
||||||
get_agent_id
|
get_agent_id
|
||||||
|
get_agent_ids_from_alias
|
||||||
get_agent_address
|
get_agent_address
|
||||||
get_agent_alias
|
get_agent_alias
|
||||||
get_agent_group
|
get_agent_group
|
||||||
|
@ -232,6 +233,17 @@ sub get_agent_id ($$) {
|
||||||
return defined ($rc) ? $rc : -1;
|
return defined ($rc) ? $rc : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
########################################################################
|
||||||
|
## Return agent IDs given an agent alias.
|
||||||
|
########################################################################
|
||||||
|
sub get_agent_ids_from_alias ($$) {
|
||||||
|
my ($dbh, $agent_alias) = @_;
|
||||||
|
|
||||||
|
my @rc = get_db_rows ($dbh, "SELECT id_agente, nombre FROM tagente WHERE alias = ?", safe_input($agent_alias));
|
||||||
|
|
||||||
|
return @rc;
|
||||||
|
}
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
## Return server ID given the name of server.
|
## Return server ID given the name of server.
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
|
@ -141,6 +141,7 @@ our @EXPORT = qw(
|
||||||
long_to_ip
|
long_to_ip
|
||||||
ip_to_long
|
ip_to_long
|
||||||
get_enabled_servers
|
get_enabled_servers
|
||||||
|
dateTimeToTimestamp
|
||||||
);
|
);
|
||||||
|
|
||||||
# ID of the different servers
|
# ID of the different servers
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue