diff options
Diffstat (limited to 'src/client.c')
-rw-r--r-- | src/client.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/client.c b/src/client.c index 7c66a38..b475189 100644 --- a/src/client.c +++ b/src/client.c @@ -133,7 +133,6 @@ static int og_resp_hardware(json_t *data, struct og_client *cli) if (!dbi) { syslog(LOG_ERR, "cannot open connection database (%s:%d)\n", __func__, __LINE__); - og_dbi_free_computer_info(&computer); return -1; } @@ -150,7 +149,6 @@ static int og_resp_hardware(json_t *data, struct og_client *cli) res = actualizaHardware(dbi, legacy.hardware, legacy.id, computer.name, legacy.center); og_dbi_close(dbi); - og_dbi_free_computer_info(&computer); if (!res) { syslog(LOG_ERR, "Problem updating client configuration\n"); @@ -203,7 +201,6 @@ static int og_resp_software(json_t *data, struct og_client *cli) if (!dbi) { syslog(LOG_ERR, "cannot open connection database (%s:%d)\n", __func__, __LINE__); - og_dbi_free_computer_info(&computer); return -1; } @@ -221,7 +218,6 @@ static int og_resp_software(json_t *data, struct og_client *cli) res = actualizaSoftware(dbi, legacy.software, legacy.part, legacy.id, computer.name, legacy.center); og_dbi_close(dbi); - og_dbi_free_computer_info(&computer); if (!res) { syslog(LOG_ERR, "Problem updating client configuration\n"); @@ -351,7 +347,6 @@ static int og_resp_refresh(json_t *data, struct og_client *cli) if (!dbi) { syslog(LOG_ERR, "cannot open connection database (%s:%d)\n", __func__, __LINE__); - og_dbi_free_computer_info(&computer); return -1; } @@ -366,19 +361,15 @@ static int og_resp_refresh(json_t *data, struct og_client *cli) if (!res) { syslog(LOG_ERR, "Problem updating client configuration\n"); - og_dbi_free_computer_info(&computer); return -1; } if (!cli->autorun && computer.procedure_id) { cli->autorun = true; - if (og_dbi_queue_autorun(computer.id, computer.procedure_id)) { - og_dbi_free_computer_info(&computer); + if (og_dbi_queue_autorun(computer.id, computer.procedure_id)) return -1; - } } - og_dbi_free_computer_info(&computer); return 0; } @@ -502,12 +493,10 @@ static int og_resp_image_create(json_t *data, struct og_client *cli) computer.name, soft_legacy.center); if (!res) { - og_dbi_free_computer_info(&computer); og_dbi_close(dbi); syslog(LOG_ERR, "Problem updating client configuration\n"); return -1; } - og_dbi_free_computer_info(&computer); res = actualizaCreacionImagen(dbi, img_legacy.image_id, @@ -609,8 +598,6 @@ static int og_resp_image_restore(json_t *data, struct og_client *cli) snprintf(img_legacy.disk, sizeof(img_legacy.disk), "%s", disk); snprintf(soft_legacy.id, sizeof(soft_legacy.id), "%d", computer.id); - og_dbi_free_computer_info(&computer); - res = actualizaRestauracionImagen(dbi, img_legacy.image_id, img_legacy.disk, |