aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ccid.c
diff options
context:
space:
mode:
authorGerrit Renker <gerrit@erg.abdn.ac.uk>2009-01-05 00:45:33 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-05 00:45:33 -0500
commit129fa44785a399248ae2466b6cb5c655e96668f7 (patch)
treec2440b83e752c6cf3e6ec6f60492b85ddb8932a9 /net/dccp/ccid.c
parente5fd56ca4eb3a130882bbef69d6952ef6aca5c8d (diff)
dccp: Integrate the TFRC library with DCCP
This patch integrates the TFRC library, which is a dependency of CCID-3 (and CCID-4), with the new use of CCIDs in the DCCP module. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/ccid.c')
-rw-r--r--net/dccp/ccid.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/dccp/ccid.c b/net/dccp/ccid.c
index 19b214ad5e06..f3e9ba1cfd01 100644
--- a/net/dccp/ccid.c
+++ b/net/dccp/ccid.c
@@ -12,6 +12,7 @@
12 */ 12 */
13 13
14#include "ccid.h" 14#include "ccid.h"
15#include "ccids/lib/tfrc.h"
15 16
16static struct ccid_operations *ccids[] = { 17static struct ccid_operations *ccids[] = {
17 &ccid2_ops, 18 &ccid2_ops,
@@ -199,7 +200,10 @@ void ccid_hc_tx_delete(struct ccid *ccid, struct sock *sk)
199 200
200int __init ccid_initialize_builtins(void) 201int __init ccid_initialize_builtins(void)
201{ 202{
202 int i, err; 203 int i, err = tfrc_lib_init();
204
205 if (err)
206 return err;
203 207
204 for (i = 0; i < ARRAY_SIZE(ccids); i++) { 208 for (i = 0; i < ARRAY_SIZE(ccids); i++) {
205 err = ccid_activate(ccids[i]); 209 err = ccid_activate(ccids[i]);
@@ -211,6 +215,7 @@ int __init ccid_initialize_builtins(void)
211unwind_registrations: 215unwind_registrations:
212 while(--i >= 0) 216 while(--i >= 0)
213 ccid_deactivate(ccids[i]); 217 ccid_deactivate(ccids[i]);
218 tfrc_lib_exit();
214 return err; 219 return err;
215} 220}
216 221
@@ -220,4 +225,5 @@ void ccid_cleanup_builtins(void)
220 225
221 for (i = 0; i < ARRAY_SIZE(ccids); i++) 226 for (i = 0; i < ARRAY_SIZE(ccids); i++)
222 ccid_deactivate(ccids[i]); 227 ccid_deactivate(ccids[i]);
228 tfrc_lib_exit();
223} 229}