summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/frct.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-04-26 11:57:56 +0200
committerdimitri staessens <dimitri.staessens@ugent.be>2017-04-26 12:01:52 +0200
commite2c8623e66d66f4b9c8619349d11375a32ac2134 (patch)
tree4e4d3b4f8da805ca9f0f0733977ff678c064660f /src/ipcpd/normal/frct.c
parentea16fc664673d65c0e3e51591258be4d3b8be406 (diff)
downloadouroboros-e2c8623e66d66f4b9c8619349d11375a32ac2134.tar.gz
ouroboros-e2c8623e66d66f4b9c8619349d11375a32ac2134.zip
lib: Add call to reserve blocks in rdrbuff
This adds a call ipcp_sdb_reserve to reserve memory in the rdrbuff without directly writing to a flow. The ipcp_flow_del function was renamed to ipcp_sdb_release. The functions operating on sdbs are moved to their own header.
Diffstat (limited to 'src/ipcpd/normal/frct.c')
-rw-r--r--src/ipcpd/normal/frct.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ipcpd/normal/frct.c b/src/ipcpd/normal/frct.c
index bfcde1b3..71e32bd1 100644
--- a/src/ipcpd/normal/frct.c
+++ b/src/ipcpd/normal/frct.c
@@ -229,7 +229,7 @@ int frct_post_sdu(struct pci * pci,
pci->src_cep_id);
if (instance == NULL) {
pthread_mutex_unlock(&frct.instances_lock);
- ipcp_flow_del(sdb);
+ ipcp_sdb_release(sdb);
return -ENOMEM;
}
id = instance->cep_id;
@@ -237,7 +237,7 @@ int frct_post_sdu(struct pci * pci,
instance = frct.instances[pci->dst_cep_id];
if (instance == NULL) {
pthread_mutex_unlock(&frct.instances_lock);
- ipcp_flow_del(sdb);
+ ipcp_sdb_release(sdb);
return -1;
}
id = pci->dst_cep_id;
@@ -253,16 +253,16 @@ int frct_post_sdu(struct pci * pci,
if (fa_post_buf(id, &buf)) {
log_err("Failed to hand buffer to FA.");
- ipcp_flow_del(sdb);
+ ipcp_sdb_release(sdb);
return -1;
}
- ipcp_flow_del(sdb);
+ ipcp_sdb_release(sdb);
} else {
/* FIXME: Known cep-ids are delivered to FA (minimal DTP) */
if (fa_post_sdu(pci->dst_cep_id, sdb)) {
log_err("Failed to hand SDU to FA.");
- ipcp_flow_del(sdb);
+ ipcp_sdb_release(sdb);
return -1;
}
}