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
d8aaf0c8
Commit
d8aaf0c8
authored
Oct 24, 2013
by
vysheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added some debug info
parent
79aa30d2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
mtproto-client.c
mtproto-client.c
+3
-0
queries.c
queries.c
+6
-2
No files found.
mtproto-client.c
View file @
d8aaf0c8
...
...
@@ -991,6 +991,9 @@ void work_msgs_ack (struct connection *c UU, long long msg_id UU) {
int
i
;
for
(
i
=
0
;
i
<
n
;
i
++
)
{
long
long
id
=
fetch_long
();
if
(
verbosity
)
{
logprintf
(
"ack for %lld
\n
"
,
id
);
}
query_ack
(
id
);
}
}
...
...
queries.c
View file @
d8aaf0c8
...
...
@@ -51,6 +51,7 @@ double get_double_time (void) {
}
struct
query
*
query_get
(
long
long
id
)
{
tree_check_query
(
queries_tree
);
return
tree_lookup_query
(
queries_tree
,
(
void
*
)
&
id
);
}
...
...
@@ -59,8 +60,9 @@ int alarm_query (struct query *q) {
if
(
verbosity
)
{
logprintf
(
"Alarm query %lld
\n
"
,
q
->
msg_id
);
}
tree_delete_query
(
queries_tree
,
q
);
q
->
ev
.
timeout
=
get_double_time
()
+
QUERY_TIMEOUT
;
insert_event_timer
(
&
q
->
ev
);
//
insert_event_timer (&q->ev);
return
0
;
}
...
...
@@ -80,7 +82,7 @@ struct query *send_query (struct dc *DC, int ints, void *data, struct query_meth
memcpy
(
q
->
data
,
data
,
4
*
ints
);
q
->
msg_id
=
encrypt_send_message
(
DC
->
sessions
[
0
]
->
c
,
data
,
ints
,
1
);
if
(
verbosity
)
{
logprintf
(
"Msg_id is %lld
\n
"
,
q
->
msg_id
);
logprintf
(
"Msg_id is %lld
%p
\n
"
,
q
->
msg_id
,
q
);
}
q
->
methods
=
methods
;
q
->
DC
=
DC
;
...
...
@@ -103,6 +105,8 @@ struct query *send_query (struct dc *DC, int ints, void *data, struct query_meth
void
query_ack
(
long
long
id
)
{
struct
query
*
q
=
query_get
(
id
);
if
(
q
&&
!
(
q
->
flags
&
QUERY_ACK_RECEIVED
))
{
tree_check_query
(
queries_tree
);
assert
(
q
->
msg_id
==
id
);
q
->
flags
|=
QUERY_ACK_RECEIVED
;
remove_event_timer
(
&
q
->
ev
);
}
...
...
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