summaryrefslogtreecommitdiff
path: root/src/lib/cdap.c
diff options
context:
space:
mode:
authorSander Vrijders <[email protected]>2016-07-28 17:23:42 +0200
committerSander Vrijders <[email protected]>2016-08-01 11:12:14 +0200
commitcf719963be2e42026012e152ae49f4c764dd9b4f (patch)
tree102b5d165aa246fa601cd565646db2ddb7e6d0b0 /src/lib/cdap.c
parent0fdc2c081b63cc3ca38bd97703c113245075aa18 (diff)
downloadouroboros-cf719963be2e42026012e152ae49f4c764dd9b4f.tar.gz
ouroboros-cf719963be2e42026012e152ae49f4c764dd9b4f.zip
ipcpd: normal: Allow initiating enrollment
This will add more functionality for enrolling two normal IPCPs with each other. Some bugs were fixed in CDAP. Now on enrolling, an IPCP will send a START message to the other IPCP. Next step is syncing the RIBs.
Diffstat (limited to 'src/lib/cdap.c')
-rw-r--r--src/lib/cdap.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/cdap.c b/src/lib/cdap.c
index 441f7e44..4599fd8b 100644
--- a/src/lib/cdap.c
+++ b/src/lib/cdap.c
@@ -212,6 +212,7 @@ struct cdap * cdap_create(struct cdap_ops * ops,
}
instance->ops = ops;
+ instance->fd = fd;
instance->ids = bmp_create(IDS_SIZE, 0);
if (instance->ids == NULL) {
@@ -234,6 +235,9 @@ int cdap_destroy(struct cdap * instance)
pthread_cancel(instance->reader);
+ if (flow_dealloc(instance->fd))
+ return -1;
+
pthread_mutex_lock(&instance->ids_lock);
bmp_destroy(instance->ids);