summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-02-22 23:53:04 +0100
committerdimitri staessens <dimitri.staessens@ugent.be>2017-02-22 23:53:04 +0100
commit406cf2d7a347222ef0526d1db0d3cb191c287656 (patch)
treefbaff96332e36ffd67c9eb06a8a8579adb6ef979 /src/ipcpd/normal
parentb3913bd7d7c1fb4cc82de750990d2111df2d9b2d (diff)
downloadouroboros-406cf2d7a347222ef0526d1db0d3cb191c287656.tar.gz
ouroboros-406cf2d7a347222ef0526d1db0d3cb191c287656.zip
irmd: Check IPCP type before bootstrap
This prevents assertion failures in the IPCP in some cases. IPCPs can now safely assert the type.
Diffstat (limited to 'src/ipcpd/normal')
-rw-r--r--src/ipcpd/normal/main.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/ipcpd/normal/main.c b/src/ipcpd/normal/main.c
index e3955ff2..c41b6187 100644
--- a/src/ipcpd/normal/main.c
+++ b/src/ipcpd/normal/main.c
@@ -344,10 +344,8 @@ static int normal_ipcp_bootstrap(struct dif_config * conf)
(void) pol;
- if (conf == NULL || conf->type != THIS_TYPE) {
- log_err("Bad DIF configuration.");
- return -EINVAL;
- }
+ assert(conf);
+ assert(conf->type == THIS_TYPE);
pthread_rwlock_wrlock(&ipcpi.state_lock);