summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/irmd/main.c6
-rw-r--r--src/lib/irm.c4
-rw-r--r--src/tools/irm/irm_create_ipcp.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/irmd/main.c b/src/irmd/main.c
index c47bcffc..31dabebb 100644
--- a/src/irmd/main.c
+++ b/src/irmd/main.c
@@ -218,8 +218,8 @@ static int reg_name_entry_del_name(char * name)
return 0;
}
-static int create_ipcp(char * ap_name,
- enum ipcp_type ipcp_type)
+static pid_t create_ipcp(char * ap_name,
+ enum ipcp_type ipcp_type)
{
pid_t pid;
struct ipcp_entry * tmp = NULL;
@@ -254,7 +254,7 @@ static int create_ipcp(char * ap_name,
LOG_DBG("Created IPC process with pid %d", pid);
list_add(&tmp->next, &instance->ipcps);
- return 0;
+ return pid;
}
static int destroy_ipcp(instance_name_t * api)
diff --git a/src/lib/irm.c b/src/lib/irm.c
index d3c77f2e..cc1c0d01 100644
--- a/src/lib/irm.c
+++ b/src/lib/irm.c
@@ -30,8 +30,8 @@
#include <stdlib.h>
-int irm_create_ipcp(char * ipcp_name,
- enum ipcp_type ipcp_type)
+pid_t irm_create_ipcp(char * ipcp_name,
+ enum ipcp_type ipcp_type)
{
irm_msg_t msg = IRM_MSG__INIT;
irm_msg_t * recv_msg = NULL;
diff --git a/src/tools/irm/irm_create_ipcp.c b/src/tools/irm/irm_create_ipcp.c
index 3c9b9cb8..e82bd980 100644
--- a/src/tools/irm/irm_create_ipcp.c
+++ b/src/tools/irm/irm_create_ipcp.c
@@ -78,5 +78,5 @@ int do_create_ipcp(int argc, char ** argv)
return -1;
}
- return irm_create_ipcp(ipcp_name, type);
+ return !irm_create_ipcp(ipcp_name, type);
}