projects
/
l2tpns.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
foo
[l2tpns.git]
/
tbf.c
diff --git
a/tbf.c
b/tbf.c
index
17a989b
..
0f6cf5b
100644
(file)
--- a/
tbf.c
+++ b/
tbf.c
@@
-1,6
+1,6
@@
// L2TPNS: token bucket filters
// L2TPNS: token bucket filters
-char const *cvs_id_tbf = "$Id: tbf.c,v 1.
5 2004-08-26 06:22:3
7 fred_nerk Exp $";
+char const *cvs_id_tbf = "$Id: tbf.c,v 1.
6 2004-09-02 04:18:0
7 fred_nerk Exp $";
#define _GNU_SOURCE
#define _GNU_SOURCE
@@
-21,8
+21,7
@@
static void tbf_run_queue(int tbf_id);
void init_tbf(void)
{
void init_tbf(void)
{
- filter_list = mmap(NULL, sizeof(*filter_list) * MAXTBFS, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, 0, 0);
- if (!filter_list)
+ if ((filter_list = shared_malloc(sizeof(*filter_list) * MAXTBFS)) == MAP_FAILED)
return;
filter_list_size = MAXTBFS;
return;
filter_list_size = MAXTBFS;