From e2c8623e66d66f4b9c8619349d11375a32ac2134 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Wed, 26 Apr 2017 11:57:56 +0200 Subject: 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. --- src/ipcpd/normal/frct.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/ipcpd/normal/frct.c') 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; } } -- cgit v1.2.3