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
a000522f
Commit
a000522f
authored
Apr 17, 2009
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Parse hello-intervals as a number of seconds.
This is an incompatible change in the syntax of the config file.
parent
72f344f4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
config.c
config.c
+19
-1
No files found.
config.c
View file @
a000522f
...
...
@@ -129,6 +129,24 @@ getint(int c, int *int_r, gnc_t gnc, void *closure)
return
c
;
}
static
int
getmsec
(
int
c
,
int
*
int_r
,
gnc_t
gnc
,
void
*
closure
)
{
char
*
t
;
int
i
;
c
=
getword
(
c
,
&
t
,
gnc
,
closure
);
if
(
c
<
-
1
)
return
c
;
i
=
parse_msec
(
t
);
if
(
i
<
0
)
{
free
(
t
);
return
-
2
;
}
free
(
t
);
*
int_r
=
i
;
return
c
;
}
static
int
getbool
(
int
c
,
int
*
int_r
,
gnc_t
gnc
,
void
*
closure
)
{
...
...
@@ -388,7 +406,7 @@ parse_nconf(gnc_t gnc, void *closure)
nconf
->
cost
=
cost
;
}
else
if
(
strcmp
(
token
,
"hello-interval"
)
==
0
)
{
int
interval
;
c
=
get
int
(
c
,
&
interval
,
gnc
,
closure
);
c
=
get
msec
(
c
,
&
interval
,
gnc
,
closure
);
if
(
c
<
-
1
||
interval
<=
0
||
interval
>
10
*
0xFFFF
)
goto
error
;
nconf
->
hello_interval
=
interval
;
...
...
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