Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
291c28e4
Commit
291c28e4
authored
Apr 23, 2019
by
Adrien Béraud
Browse files
jamiaccount: ensure no precision loss when computing time slot
Change-Id: I710fde159c4ba52eade7037e620c7d7184c49e15
parent
c2220f93
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/jamidht/jamiaccount.cpp
View file @
291c28e4
...
...
@@ -1028,7 +1028,7 @@ JamiAccount::computeKeys(const std::string& password, const std::string& pin, bo
{
// Compute time seed
auto
now
=
std
::
chrono
::
duration_cast
<
std
::
chrono
::
seconds
>
(
clock
::
now
().
time_since_epoch
());
auto
tseed
=
now
.
count
()
/
std
::
chrono
::
duration_cast
<
std
::
chrono
::
seconds
>
(
EXPORT_KEY_RENEWAL_TIME
).
count
();
auto
tseed
=
now
.
count
()
/
std
::
chrono
::
seconds
(
EXPORT_KEY_RENEWAL_TIME
).
count
();
if
(
previous
)
tseed
--
;
std
::
stringstream
ss
;
...
...
Write
Preview
Supports
Markdown
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