aboutsummaryrefslogtreecommitdiff
path: root/src/ec2map.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ec2map.c')
-rw-r--r--src/ec2map.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/ec2map.c b/src/ec2map.c
index 6e2be10..3dbf4f1 100644
--- a/src/ec2map.c
+++ b/src/ec2map.c
@@ -1,5 +1,5 @@
/* This file is part of Eclat.
- Copyright (C) 2012-2015 Sergey Poznyakoff.
+ Copyright (C) 2012-2018 Sergey Poznyakoff.
Eclat is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -32,7 +32,6 @@ struct ec2_map {
char *action;
struct grecs_list *args;
char *ret;
- struct eclat_io *io;
};
static struct grecs_keyword ec2_map_kw[] = {
@@ -56,7 +55,6 @@ static void
ec2_map_free(int dbg, void *data)
{
struct ec2_map *map = data;
- eclat_io_free(map->io);
free(map->action);
free(map->ret);
grecs_list_free(map->args);
@@ -114,23 +112,12 @@ ec2_map_config(int dbg, struct grecs_node *node, void *data)
static int
ec2_map_open(int dbg, void *data)
{
- struct ec2_map *map = data;
-
- map->io = eclat_io_init(0);
- if (!map->io) {
- err("cannot open EC2 database");
- return eclat_map_failure;
- }
return eclat_map_ok;
}
static int
ec2_map_close(int dbg, void *data)
{
- struct ec2_map *map = data;
-
- eclat_io_free(map->io);
- map->io = NULL;
return 0;
}
@@ -184,14 +171,9 @@ ec2_map_get(int dbg, int dir, void *data, const char *key, char **return_value)
return eclat_map_failure;
}
- rc = eclat_send_request(map->io->curl, q);
-
- if (rc)
+ if (eclat_send_request(q, &tree))
return eclat_map_failure;
- tree = eclat_io_finish(map->io);
-
-
node = grecs_find_node(tree, map->ret);
if (debug_category[dbg].level > 1) {

Return to:

Send suggestions and report system problems to the System administrator.