Skip to content
Snippets Groups Projects
Commit f32b9480 authored by Erik Alexandre Pucci's avatar Erik Alexandre Pucci Committed by Danilo K. S. Yorinori
Browse files

client.c: Updated main() to not to use availability option nor MAC address


Updated verify_parameters() call (without passing MAC address).

Signed-off-by: default avatarErik Alexandre Pucci <eap08@c3sl.ufpr.br>
Acked-by: default avatarRicardo Tavares de Oliveira <rto07@c3sl.ufpr.br>
Signed-off-by: default avatarDanilo K. S. Yorinori <danilok@c3sl.ufpr.br>
parent c43b70ea
Branches
No related tags found
No related merge requests found
......@@ -42,15 +42,15 @@
int main(int argc, char **argv)
{
struct soap *soap = soap_new();
char *url, *inep, *macAddr, *basedir, *clientVersion;
char *url, *inep, *basedir, *clientVersion;
int arglen, len, option;
url = inep = macAddr = NULL;
url = inep = NULL;
/* Initialization *
*-----------------------------------------------------------------------
* Verify parameters */
option = verify_parameters(argc, argv, soap, &url, &inep, &macAddr);
option = verify_parameters(argc, argv, soap, &url, &inep);
/* Timeout settings */
soap->send_timeout = TIMEOUT;
......@@ -64,7 +64,7 @@ int main(int argc, char **argv)
DEBUG("Arg: %s basedir: %s\n", argv[0], basedir);
if ((option < 2) && (inep) && (inep[0] == '\0'))
if ((option != 1) && (inep) && (inep[0] == '\0'))
{
ERROR("ERROR (11): Invalid INEP error (empty string).\n");
/* Invalid INEP error */
......@@ -74,7 +74,7 @@ int main(int argc, char **argv)
/* End of Initialization
*-----------------------------------------------------------------------
* Update option */
if (option == 2)
if (option == 1)
{
/* Get client version from file */
clientVersion = read_version_file(basedir);
......@@ -84,20 +84,12 @@ int main(int argc, char **argv)
/* End of Update option
*------------------------------------------------------------------------
* Inventory option */
else if (option == 1)
else
{
/* Inventory method */
inventory(soap, url, basedir);
}
/* End of update inventory option
*------------------------------------------------------------------------
* Options off */
else
{
/* Availability method */
availability(soap, url, inep, macAddr);
}
/* End of options off
*------------------------------------------------------------------------
* Finalize execution */
soap_end(soap);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment