diff options
author | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-03-29 23:32:04 +0200 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-03-30 00:00:20 +0200 |
commit | 2ed8914deed73a558c6fbac7f107f47dc22f22d2 (patch) | |
tree | 7343797577910a35fc90f707e1618054ae90b839 /src/tools/irm/irm_register_ipcp.c | |
parent | 1d4442e472d20f261986089ea468daa93631d1f4 (diff) | |
download | ouroboros-2ed8914deed73a558c6fbac7f107f47dc22f22d2.tar.gz ouroboros-2ed8914deed73a558c6fbac7f107f47dc22f22d2.zip |
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 *
Diffstat (limited to 'src/tools/irm/irm_register_ipcp.c')
-rw-r--r-- | src/tools/irm/irm_register_ipcp.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/tools/irm/irm_register_ipcp.c b/src/tools/irm/irm_register_ipcp.c index b8808ecd..f0c1ccff 100644 --- a/src/tools/irm/irm_register_ipcp.c +++ b/src/tools/irm/irm_register_ipcp.c @@ -47,14 +47,13 @@ int do_register_ipcp(int argc, char ** argv) { char * difs[MAX_DIFS]; size_t difs_size = 0; - 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 if (matches(*argv, "dif") == 0) { difs[difs_size++] = *(argv + 1); if (difs_size > MAX_DIFS) { @@ -71,10 +70,10 @@ int do_register_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_reg_ipcp(ap_name, api_id, difs, difs_size); + return irm_reg_ipcp(&api, difs, difs_size); } |