Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
babeld
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
babeld
Commits
678b3973
Commit
678b3973
authored
Mar 13, 2008
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use an explicit constant for the source GC time.
parent
e0f3b52d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
2 deletions
+4
-2
route.c
route.c
+1
-1
source.c
source.c
+1
-1
source.h
source.h
+2
-0
No files found.
route.c
View file @
678b3973
...
@@ -228,7 +228,7 @@ update_feasible(const unsigned char *a,
...
@@ -228,7 +228,7 @@ update_feasible(const unsigned char *a,
if
(
src
==
NULL
)
if
(
src
==
NULL
)
return
1
;
return
1
;
if
(
src
->
time
<
now
.
tv_sec
-
200
)
if
(
src
->
time
<
now
.
tv_sec
-
SOURCE_GC_TIME
)
/* Never mind what is probably stale data */
/* Never mind what is probably stale data */
return
1
;
return
1
;
...
...
source.c
View file @
678b3973
...
@@ -98,7 +98,7 @@ update_source(struct source *src,
...
@@ -98,7 +98,7 @@ update_source(struct source *src,
if
(
metric
>=
INFINITY
)
if
(
metric
>=
INFINITY
)
return
;
return
;
if
(
src
->
time
<
now
.
tv_sec
-
200
||
if
(
src
->
time
<
now
.
tv_sec
-
SOURCE_GC_TIME
||
seqno_compare
(
src
->
seqno
,
seqno
)
<
0
||
seqno_compare
(
src
->
seqno
,
seqno
)
<
0
||
(
src
->
seqno
==
seqno
&&
src
->
metric
>
metric
))
{
(
src
->
seqno
==
seqno
&&
src
->
metric
>
metric
))
{
src
->
seqno
=
seqno
;
src
->
seqno
=
seqno
;
...
...
source.h
View file @
678b3973
...
@@ -20,6 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
...
@@ -20,6 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
THE SOFTWARE.
*/
*/
#define SOURCE_GC_TIME 200
struct
source
{
struct
source
{
unsigned
char
address
[
16
];
unsigned
char
address
[
16
];
unsigned
char
prefix
[
16
];
unsigned
char
prefix
[
16
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment