diff options
author | dimitri staessens <[email protected]> | 2016-10-26 15:03:00 +0000 |
---|---|---|
committer | dimitri staessens <[email protected]> | 2016-10-26 15:03:00 +0000 |
commit | cd6db513e66ad0bccb06b3b36e13824ad03c18ee (patch) | |
tree | 5f77626c3ad3b411c1741050f8b24ae498c7de93 /src/tools/irm/irm_ipcp_enroll.c | |
parent | f60e18adc78afaf4d07a10e6fe8aec3767e0ca11 (diff) | |
parent | aa11e240def809e92d42dcfd0ac934606967583b (diff) | |
download | ouroboros-cd6db513e66ad0bccb06b3b36e13824ad03c18ee.tar.gz ouroboros-cd6db513e66ad0bccb06b3b36e13824ad03c18ee.zip |
Merged in sandervrijders/ouroboros/be-bind-ipcp (pull request #284)
tools: irm: Bind IPCP name to IPCP-I
Diffstat (limited to 'src/tools/irm/irm_ipcp_enroll.c')
-rw-r--r-- | src/tools/irm/irm_ipcp_enroll.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tools/irm/irm_ipcp_enroll.c b/src/tools/irm/irm_ipcp_enroll.c index b5517bcd..911a81a1 100644 --- a/src/tools/irm/irm_ipcp_enroll.c +++ b/src/tools/irm/irm_ipcp_enroll.c @@ -40,6 +40,7 @@ int do_enroll_ipcp(int argc, char ** argv) char * name = NULL; char * dif_name = NULL; pid_t * apis = NULL; + pid_t api; ssize_t len = 0; int i = 0; @@ -65,8 +66,10 @@ int do_enroll_ipcp(int argc, char ** argv) len = irm_list_ipcps(name, &apis); if (len <= 0) { - if (!irm_create_ipcp(name, IPCP_NORMAL)) + api = irm_create_ipcp(name, IPCP_NORMAL); + if (api == 0) return -1; + irm_bind_api(api, name); len = irm_list_ipcps(name, &apis); } |