summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2017-08-23 12:56:26 +0200
committerSander Vrijders <sander.vrijders@ugent.be>2017-08-23 12:56:26 +0200
commit4be31447a73a739e4fb44a1629d2adcb6c2b0f21 (patch)
tree0f4f05290472bed98b0f7a8c98c48d6e937825bd
parent2ece569453f142708f79d344bb5ce1619b350fc1 (diff)
parent75d30986da7f8268e4021dc0981483f641ec8135 (diff)
downloadouroboros-4be31447a73a739e4fb44a1629d2adcb6c2b0f21.tar.gz
ouroboros-4be31447a73a739e4fb44a1629d2adcb6c2b0f21.zip
Merge branch 'testing' into be
-rw-r--r--src/irmd/main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/irmd/main.c b/src/irmd/main.c
index 77471cfc..66c230c8 100644
--- a/src/irmd/main.c
+++ b/src/irmd/main.c
@@ -296,6 +296,7 @@ static pid_t create_ipcp(char * name,
struct timespec dl;
struct timespec to = {SOCKET_TIMEOUT / 1000,
(SOCKET_TIMEOUT % 1000) * MILLION};
+ pid_t ipcp_pid;
api = malloc(sizeof(*api));
if (api == NULL)
@@ -348,6 +349,7 @@ static pid_t create_ipcp(char * name,
tmp->type = ipcp_type;
tmp->init_state = IPCP_BOOT;
tmp->dir_hash_algo = -1;
+ ipcp_pid = tmp->api;
list_for_each(p, &irmd.ipcps) {
struct ipcp_entry * e = list_entry(p, struct ipcp_entry, next);
@@ -376,15 +378,15 @@ static pid_t create_ipcp(char * name,
tmp->init_state = IPCP_NULL;
pthread_cond_signal(&tmp->init_cond);
pthread_mutex_unlock(&tmp->init_lock);
- log_err("IPCP %d failed to respond.", tmp->api);
+ log_err("IPCP %d failed to respond.", ipcp_pid);
return -1;
}
pthread_mutex_unlock(&tmp->init_lock);
- log_info("Created IPCP %d.", tmp->api);
+ log_info("Created IPCP %d.", ipcp_pid);
- return api->pid;
+ return ipcp_pid;
}
static int create_ipcp_r(pid_t api,