Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
PPSi
Commits
4870a0fe
Commit
4870a0fe
authored
Mar 02, 2013
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check announce interval when set, not when used
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
89185bf9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
cmdline.c
lib/cmdline.c
+5
-0
common-fun.c
proto-standard/common-fun.c
+2
-5
No files found.
lib/cmdline.c
View file @
4870a0fe
...
...
@@ -166,7 +166,12 @@ int pp_parse_cmdline(struct pp_instance *ppi, int argc, char **argv)
break
;
case
'n'
:
a
=
argv
[
++
i
];
/* Page 237 says 0 to 4 (1s .. 16s) */
OPTS
(
ppi
)
->
announce_intvl
=
atoi
(
a
);
if
(
OPTS
(
ppi
)
->
announce_intvl
<
0
)
OPTS
(
ppi
)
->
announce_intvl
=
0
;
if
(
OPTS
(
ppi
)
->
announce_intvl
>
4
)
OPTS
(
ppi
)
->
announce_intvl
=
4
;
break
;
case
'm'
:
a
=
argv
[
++
i
];
...
...
proto-standard/common-fun.c
View file @
4870a0fe
...
...
@@ -47,18 +47,15 @@ int st_com_execute_slave(struct pp_instance *ppi, int check_delayreq)
return
ret
;
}
/* Called by listening, passive, slave, and this same file */
void
st_com_restart_annrec_timer
(
struct
pp_instance
*
ppi
)
{
/* 0 <= logAnnounceInterval <= 4, see pag. 237 of spec */
if
(
DSPOR
(
ppi
)
->
logAnnounceInterval
<
0
)
PP_PRINTF
(
"Error: logAnnounceInterval < 0"
);
pp_timeout_set
(
ppi
,
PP_TO_ANN_RECEIPT
,
((
DSPOR
(
ppi
)
->
announceReceiptTimeout
)
<<
DSPOR
(
ppi
)
->
logAnnounceInterval
)
*
1000
);
}
/* Called by listening, master, passive, slave */
int
st_com_check_record_update
(
struct
pp_instance
*
ppi
)
{
if
(
ppi
->
record_update
)
{
...
...
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