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
598e58ce
Commit
598e58ce
authored
Oct 05, 2007
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't discard reboot time from babel-state when ids mismatch.
parent
afd85bc0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
babel.c
babel.c
+8
-3
No files found.
babel.c
View file @
598e58ce
...
@@ -261,12 +261,13 @@ main(int argc, char **argv)
...
@@ -261,12 +261,13 @@ main(int argc, char **argv)
rc
=
parse_address
(
buf2
,
sid
);
rc
=
parse_address
(
buf2
,
sid
);
if
(
rc
<
0
)
{
if
(
rc
<
0
)
{
fprintf
(
stderr
,
"Couldn't parse babel-state.
\n
"
);
fprintf
(
stderr
,
"Couldn't parse babel-state.
\n
"
);
}
else
if
(
memcmp
(
sid
,
myid
,
16
)
!=
0
)
{
fprintf
(
stderr
,
"ID mismatch in babel-state.
\n
"
);
}
else
{
}
else
{
debugf
(
"Got %s %d %ld from babel-state.
\n
"
,
debugf
(
"Got %s %d %ld from babel-state.
\n
"
,
format_address
(
sid
),
s
,
t
);
format_address
(
sid
),
s
,
t
);
if
(
memcmp
(
sid
,
myid
,
16
)
==
0
)
myseqno
=
seqno_plus
(
s
,
1
);
myseqno
=
seqno_plus
(
s
,
1
);
else
fprintf
(
stderr
,
"ID mismatch in babel-state.
\n
"
);
if
(
t
>=
1176800000L
&&
t
<=
now
.
tv_sec
)
if
(
t
>=
1176800000L
&&
t
<=
now
.
tv_sec
)
reboot_time
=
t
;
reboot_time
=
t
;
}
}
...
@@ -277,6 +278,10 @@ main(int argc, char **argv)
...
@@ -277,6 +278,10 @@ main(int argc, char **argv)
close
(
fd
);
close
(
fd
);
}
}
if
(
reboot_time
+
silent_time
>
now
.
tv_sec
)
fprintf
(
stderr
,
"Respecting %ld second silent time.
\n
"
,
(
long
int
)(
reboot_time
+
silent_time
-
now
.
tv_sec
));
rc
=
kernel_setup
(
1
);
rc
=
kernel_setup
(
1
);
if
(
rc
<
0
)
{
if
(
rc
<
0
)
{
fprintf
(
stderr
,
"kernel_setup failed.
\n
"
);
fprintf
(
stderr
,
"kernel_setup failed.
\n
"
);
...
...
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