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_create_ipcp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/tools/irm/irm_create_ipcp.c') diff --git a/src/tools/irm/irm_create_ipcp.c b/src/tools/irm/irm_create_ipcp.c index 3262bd5c..73d20dce 100644 --- a/src/tools/irm/irm_create_ipcp.c +++ b/src/tools/irm/irm_create_ipcp.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -41,16 +42,15 @@ static void usage() int do_create_ipcp(int argc, char ** argv) { char * ipcp_type = NULL; - char * ap_name = NULL; - int api_id = 0; + instance_name_t api = {NULL, 0}; while (argc > 0) { if (matches(*argv, "type") == 0) { ipcp_type = *(argv + 1); } else 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 " "create_ipcp\".\n", *argv); @@ -61,10 +61,10 @@ int do_create_ipcp(int argc, char ** argv) argv += 2; } - if (ipcp_type == NULL || ap_name == NULL) { + if (ipcp_type == NULL || api.name == NULL) { usage(); return -1; } - return irm_create_ipcp(ap_name, api_id, ipcp_type); + return irm_create_ipcp(&api, ipcp_type); } -- cgit v1.2.3