Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
tg
Commits
0fef150a
Commit
0fef150a
authored
Oct 18, 2013
by
vysheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mtproto-client: fix server time on first mesasge
parent
820840ec
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
mtproto-client.c
mtproto-client.c
+5
-0
No files found.
mtproto-client.c
View file @
0fef150a
...
@@ -949,7 +949,12 @@ int process_rpc_message (struct connection *c UU, struct encrypted_message *enc,
...
@@ -949,7 +949,12 @@ int process_rpc_message (struct connection *c UU, struct encrypted_message *enc,
DC
->
server_salt
=
enc
->
server_salt
;
DC
->
server_salt
=
enc
->
server_salt
;
write_auth_file
();
write_auth_file
();
}
}
int
this_server_time
=
enc
->
msg_id
>>
32LL
;
int
this_server_time
=
enc
->
msg_id
>>
32LL
;
if
(
!
DC
->
server_time_delta
)
{
DC
->
server_time_delta
=
this_server_time
-
time
(
0
);
DC
->
server_time_udelta
=
this_server_time
-
get_utime
(
CLOCK_MONOTONIC
);
}
double
st
=
get_server_time
(
DC
);
double
st
=
get_server_time
(
DC
);
assert
(
this_server_time
>=
st
-
300
&&
this_server_time
<=
st
+
30
);
assert
(
this_server_time
>=
st
-
300
&&
this_server_time
<=
st
+
30
);
//assert (enc->msg_id > server_last_msg_id && (enc->msg_id & 3) == 1);
//assert (enc->msg_id > server_last_msg_id && (enc->msg_id & 3) == 1);
...
...
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