diff options
Diffstat (limited to 'src/client.c')
-rw-r--r-- | src/client.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/client.c b/src/client.c index 17bc8a7..96b522f 100644 --- a/src/client.c +++ b/src/client.c @@ -14,7 +14,6 @@ #include "list.h" #include "rest.h" #include "json.h" -#include "schedule.h" #include <syslog.h> #include <sys/ioctl.h> #include <ifaddrs.h> @@ -371,30 +370,6 @@ static int og_json_parse_partition_array(json_t *value, return 0; } -static int og_dbi_queue_autorun(uint32_t computer_id, uint32_t proc_id) -{ - struct og_task dummy_task = { - .scope = computer_id, - .type_scope = AMBITO_ORDENADORES, - .procedure_id = proc_id, - }; - struct og_dbi *dbi; - - dbi = og_dbi_open(&ogconfig.db); - if (!dbi) { - syslog(LOG_ERR, "cannot open connection database " - "(%s:%d)\n", __func__, __LINE__); - return -1; - } - if (og_dbi_queue_procedure(dbi, &dummy_task)) { - og_dbi_close(dbi); - return -1; - } - og_dbi_close(dbi); - - return 0; -} - static int og_update_cache_info(struct og_dbi *dbi, struct list_head *cache_list, int clientid) { struct og_cache_image *cache_image; @@ -651,13 +626,6 @@ static int og_resp_refresh(json_t *data, struct og_client *cli) goto err_out; } - if (!cli->autorun && computer.procedure_id) { - cli->autorun = true; - - if (og_dbi_queue_autorun(computer.id, computer.procedure_id)) - goto err_out; - } - og_cache_image_free(&cache_list); og_boot_entry_free(&boot_entry_list); return 0; @@ -1108,13 +1076,11 @@ int og_agent_state_process_response(struct og_client *cli) cli->last_cmd_result = OG_FAILURE; if (code != 200 && code != 103) { - og_dbi_update_action(cli->last_cmd_id, success); cli->last_cmd_id = 0; return ret; } if (!cli->content_length) { - og_dbi_update_action(cli->last_cmd_id, true); cli->last_cmd_id = 0; cli->last_cmd = OG_CMD_UNSPEC; return 0; @@ -1182,7 +1148,6 @@ int og_agent_state_process_response(struct og_client *cli) /* ... cancel pending actions related to this task for this client here */ } - og_dbi_update_action(cli->last_cmd_id, success); cli->last_cmd_id = 0; cli->last_cmd = OG_CMD_UNSPEC; |