diff options
Diffstat (limited to 'src/sg.c')
-rw-r--r-- | src/sg.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -25,7 +25,7 @@ struct groupkw groupkw[] = { { "GroupName", MAP_GROUPNAME } }; -static struct ec2_query *query; +static struct ec2_request *request; static char *command; static int list_option; static int dest_n = GROUP_ID; @@ -121,7 +121,7 @@ add_source_cidr(char *str, int i) grecs_asprintf(&bufptr, &bufsize, "IpPermissions.%d.IpRanges.%d.CidrIp", rule_n, i); - eclat_query_add_param(query, bufptr, cidrbuf); + eclat_request_add_param(request, bufptr, cidrbuf); i++; } } @@ -162,7 +162,7 @@ flush_rule() grecs_asprintf(&bufptr, &bufsize, "IpPermissions.%d.IpProtocol", rule_n); - eclat_query_add_param(query, bufptr, proto); + eclat_request_add_param(request, bufptr, proto); if (group_list) { for (i = 1, ep = group_list->head; ep; ep = ep->next, i++) { @@ -172,12 +172,12 @@ flush_rule() "IpPermissions.%d.Groups.%d.%s", rule_n, i, groupkw[a->type].resid); - eclat_query_add_param(query, bufptr, a->str); + eclat_request_add_param(request, bufptr, a->str); if (a->usr) { grecs_asprintf(&bufptr, &bufsize, "IpPermissions.%d.Groups.%d.UserId", rule_n, i); - eclat_query_add_param(query, bufptr, a->usr); + eclat_request_add_param(request, bufptr, a->usr); } } grecs_list_clear(group_list); @@ -192,7 +192,7 @@ flush_rule() grecs_asprintf(&bufptr, &bufsize, "IpPermissions.%d.IpRanges.1.CidrIp", rule_n); - eclat_query_add_param(query, bufptr, "0.0.0.0/0"); + eclat_request_add_param(request, bufptr, "0.0.0.0/0"); } if (from_port) { @@ -201,11 +201,11 @@ flush_rule() grecs_asprintf(&bufptr, &bufsize, "IpPermissions.%d.FromPort", rule_n); - eclat_query_add_param(query, bufptr, + eclat_request_add_param(request, bufptr, str2port(from_port, &pbuf, &psize)); grecs_asprintf(&bufptr, &bufsize, "IpPermissions.%d.ToPort", rule_n); - eclat_query_add_param(query, bufptr, + eclat_request_add_param(request, bufptr, str2port(to_port, &pbuf, &psize)); free(pbuf); } @@ -218,7 +218,7 @@ flush_rule() int eclat_sg(eclat_command_env_t *env, int argc, char **argv) { - query = env->query; + request = env->request; parse_options(env, argc, argv); return 0; } |