diff options
author | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-03-30 15:36:19 +0200 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-03-30 15:36:19 +0200 |
commit | 231f60c51c1346069ab82ab17eb392e039620270 (patch) | |
tree | b4dea779cd0b2de5b6ffd760704700dbb665cdf6 /src/tools/irm/irm_destroy_ipcp.c | |
parent | dd20c175f10c04bf5abd0ca764ededaa7a4ac621 (diff) | |
parent | a3f002d6f2d102588f988c99eb16c64a68706dd2 (diff) | |
download | ouroboros-231f60c51c1346069ab82ab17eb392e039620270.tar.gz ouroboros-231f60c51c1346069ab82ab17eb392e039620270.zip |
Merge branch 'be' of bitbucket.org:ouroboros-rina/ouroboros into be-flow
Diffstat (limited to 'src/tools/irm/irm_destroy_ipcp.c')
-rw-r--r-- | src/tools/irm/irm_destroy_ipcp.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/tools/irm/irm_destroy_ipcp.c b/src/tools/irm/irm_destroy_ipcp.c index fbbeb5bd..fe6ef57e 100644 --- a/src/tools/irm/irm_destroy_ipcp.c +++ b/src/tools/irm/irm_destroy_ipcp.c @@ -37,14 +37,13 @@ static void usage() int do_destroy_ipcp(int argc, char ** argv) { - char * ap_name = NULL; - int api_id = 0; + instance_name_t api = {NULL, 0}; while (argc > 0) { if (matches(*argv, "ap") == 0) { - ap_name = *(argv + 1); + api.name = *(argv + 1); } else if (matches(*argv, "api") == 0) { - api_id = atoi(*(argv + 1)); + api.id = atoi(*(argv + 1)); } else { printf("\"%s\" is unknown, try \"irm " "destroy_ipcp\".\n", *argv); @@ -55,10 +54,10 @@ int do_destroy_ipcp(int argc, char ** argv) argv += 2; } - if (ap_name == NULL) { + if (api.name == NULL) { usage(); return -1; } - return irm_destroy_ipcp(ap_name, api_id); + return irm_destroy_ipcp(&api); } |