Skip to content
Snippets Groups Projects
Commit 688e5ba3 authored by Jan Soukal's avatar Jan Soukal
Browse files

getClients vraci nove undefy pro nedefinovane polozky. example-info.txt.pl...

getClients vraci nove undefy pro nedefinovane polozky. example-info.txt.pl vypisuje misto undef retezec NULL. (#909)
parent 06617017
No related branches found
No related tags found
No related merge requests found
...@@ -30,16 +30,16 @@ print "| Client ID | Hostname | Registered | Req ...@@ -30,16 +30,16 @@ print "| Client ID | Hostname | Registered | Req
print "+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n"; print "+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n";
foreach (@clients) { foreach (@clients) {
printf("| %-10s ", $_->{'client_id'} || "unknown"); printf("| %-10s ", $_->{'client_id'} || "NULL");
printf("| %-30s ", $_->{'hostname'} || "unknown"); printf("| %-30s ", $_->{'hostname'} || "NULL");
printf("| %19s ", $_->{'registered'} || "unknown"); printf("| %19s ", $_->{'registered'} || "NULL");
printf("| %-23s ", $_->{'requestor'} || "unknown"); printf("| %-23s ", $_->{'requestor'} || "NULL");
printf("| %-25s ", $_->{'service'} || "unknown"); printf("| %-25s ", $_->{'service'} || "NULL");
printf("| %-2s ", $_->{'client_type'} || "unknown"); printf("| %-2s ", $_->{'client_type'} || "NULL");
printf("| %-15s ", $_->{'type'} || "unknown"); printf("| %-15s ", $_->{'type'} || "NULL");
printf("| %-4s ", $_->{'receive_own_events'} || "unknown"); printf("| %-4s ", $_->{'receive_own_events'} || "NULL");
printf("| %-50s ", $_->{'description_tags'} || "unknown"); printf("| %-50s ", $_->{'description_tags'} || "NULL");
printf("| %-18s |\n", $_->{'ip_net_client'} || "unknown"); printf("| %-18s |\n", $_->{'ip_net_client'} || "NULL");
} }
print "+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n"; print "+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n";
print "\n"; print "\n";
......
...@@ -154,14 +154,14 @@ sub getClientsInfo ...@@ -154,14 +154,14 @@ sub getClientsInfo
my %client; my %client;
$client{'client_id'} = $response_data->{'CLIENT_ID'} ; $client{'client_id'} = $response_data->{'CLIENT_ID'} ;
$client{'hostname'} = $response_data->{'HOSTNAME'}; $client{'hostname'} = $response_data->{'HOSTNAME'};
$client{'registered'} = $response_data->{'REGISTERED'}; $client{'registered'} = $response_data->{'REGISTERED'};
$client{'requestor'} = $response_data->{'REQUESTOR'}; $client{'requestor'} = $response_data->{'REQUESTOR'};
$client{'service'} = defined $response_data->{'SERVICE'} ? $response_data->{'SERVICE'} : "-"; $client{'service'} = $response_data->{'SERVICE'};
$client{'client_type'} = $response_data->{'CLIENT_TYPE'}; $client{'client_type'} = $response_data->{'CLIENT_TYPE'};
$client{'type'} = defined $response_data->{'TYPE'} ? $response_data->{'TYPE'} : "-"; $client{'type'} = $response_data->{'TYPE'};
$client{'receive_own_events'} = defined $response_data->{'RECEIVE_OWN_EVENTS'} ? $response_data->{'RECEIVE_OWN_EVENTS'} : "-"; $client{'receive_own_events'} = $response_data->{'RECEIVE_OWN_EVENTS'};
$client{'description_tags'} = defined $response_data->{'DESCRIPTION_TAGS'} ? $response_data->{'DESCRIPTION_TAGS'} : "-"; $client{'description_tags'} = $response_data->{'DESCRIPTION_TAGS'};
$client{'ip_net_client'} = $response_data->{'IP_NET_CLIENT'}; $client{'ip_net_client'} = $response_data->{'IP_NET_CLIENT'};
# push received clients from warden server into @clients which is returned # push received clients from warden server into @clients which is returned
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment