summaryrefslogtreecommitdiff
path: root/src/tools/irm/irm_unregister_ipcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/irm/irm_unregister_ipcp.c')
-rw-r--r--src/tools/irm/irm_unregister_ipcp.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/tools/irm/irm_unregister_ipcp.c b/src/tools/irm/irm_unregister_ipcp.c
index 1321c263..3fd6f148 100644
--- a/src/tools/irm/irm_unregister_ipcp.c
+++ b/src/tools/irm/irm_unregister_ipcp.c
@@ -45,17 +45,16 @@ static void usage()
int do_unregister_ipcp(int argc, char ** argv)
{
- char * ap_name = NULL;
- int api_id = 0;
+ instance_name_t api = {NULL, 0};
char * difs[MAX_DIFS];
size_t difs_size = 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 if (matches(*argv, "dif") == 0) {
difs[difs_size++] = *(argv + 1);
if (difs_size > MAX_DIFS) {
@@ -72,10 +71,10 @@ int do_unregister_ipcp(int argc, char ** argv)
argv += 2;
}
- if (difs_size == 0 || ap_name == NULL) {
+ if (difs_size == 0 || api.name == NULL) {
usage();
return -1;
}
- return irm_unreg_ipcp(ap_name, api_id, difs, difs_size);
+ return irm_unreg_ipcp(&api, difs, difs_size);
}