diff options
author | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-08-11 16:32:50 +0200 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-08-11 16:32:50 +0200 |
commit | b3c27cda358c24e867a42199e0d5702d9d0b1607 (patch) | |
tree | e7db1b4a83a0499b8f16cf248e62cd16d9e809d8 /src/ipcpd/normal | |
parent | 12f880ce6e6dccb9ec76a2b960413e625ad03aef (diff) | |
download | ouroboros-b3c27cda358c24e867a42199e0d5702d9d0b1607.tar.gz ouroboros-b3c27cda358c24e867a42199e0d5702d9d0b1607.zip |
ipcpd: Fix deep copy of dif_config
conf->dif_name was not copied from the dif_config gpb message.
Fixes some logs.
Diffstat (limited to 'src/ipcpd/normal')
-rw-r--r-- | src/ipcpd/normal/main.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ipcpd/normal/main.c b/src/ipcpd/normal/main.c index 555eb63d..b5aad271 100644 --- a/src/ipcpd/normal/main.c +++ b/src/ipcpd/normal/main.c @@ -135,7 +135,7 @@ static int normal_ipcp_enroll(char * dif_name) if (_ipcp->state != IPCP_INIT) { pthread_rwlock_unlock(&_ipcp->state_lock); - LOG_DBGF("Won't enroll an IPCP that is not in INIT."); + LOG_ERR("Won't enroll an IPCP that is not in INIT."); return -1; /* -ENOTINIT */ } @@ -161,11 +161,13 @@ static int normal_ipcp_enroll(char * dif_name) static int normal_ipcp_bootstrap(struct dif_config * conf) { + LOG_DBGF("bootstrapping in dif %s.", conf->dif_name); + pthread_rwlock_rdlock(&_ipcp->state_lock); if (_ipcp->state != IPCP_INIT) { pthread_rwlock_unlock(&_ipcp->state_lock); - LOG_DBGF("Won't bootstrap an IPCP that is not in INIT."); + LOG_ERR("Won't bootstrap an IPCP that is not in INIT."); return -1; /* -ENOTINIT */ } @@ -176,7 +178,7 @@ static int normal_ipcp_bootstrap(struct dif_config * conf) } if (api_bind(conf->dif_name) < 0) { - LOG_ERR("Failed to bind the server api."); + LOG_ERR("Failed to bind the server AP instance."); return -1; } |