From 2ed8914deed73a558c6fbac7f107f47dc22f22d2 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Tue, 29 Mar 2016 23:32:04 +0200 Subject: lib: renamed rina_name_t to instance_name_t all functions taking a char * ap_name and uint id now take either a instance_name_t or instance_name_t * --- src/tools/irm/irm_enroll_ipcp.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/tools/irm/irm_enroll_ipcp.c') diff --git a/src/tools/irm/irm_enroll_ipcp.c b/src/tools/irm/irm_enroll_ipcp.c index 70798821..5c9572bf 100644 --- a/src/tools/irm/irm_enroll_ipcp.c +++ b/src/tools/irm/irm_enroll_ipcp.c @@ -38,15 +38,14 @@ static void usage() int do_enroll_ipcp(int argc, char ** argv) { - char * ap_name = NULL; - int api_id = 0; + instance_name_t api = {NULL, 0}; char * dif_name = NULL; 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) { dif_name = *(argv + 1); } else { @@ -59,10 +58,10 @@ int do_enroll_ipcp(int argc, char ** argv) argv += 2; } - if (dif_name == NULL || ap_name == NULL) { + if (dif_name == NULL || api.name == NULL) { usage(); return -1; } - return irm_enroll_ipcp(ap_name, api_id, dif_name); + return irm_enroll_ipcp(&api, dif_name); } -- cgit v1.2.3