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
1789aa3c
Commit
1789aa3c
authored
Sep 15, 2014
by
Vysheng
Browse files
Options
Browse Files
Download
Plain Diff
Merge github.com:vysheng/tg
parents
89a7fa7a
5cb5b1cf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
1 deletion
+6
-1
loop.c
loop.c
+2
-0
mtproto-client.c
mtproto-client.c
+3
-1
tgl.h
tgl.h
+1
-0
No files found.
loop.c
View file @
1789aa3c
...
@@ -586,6 +586,7 @@ void dlist_cb (void *callback_extra, int success, int size, tgl_peer_id_t peers[
...
@@ -586,6 +586,7 @@ void dlist_cb (void *callback_extra, int success, int size, tgl_peer_id_t peers[
int
loop
(
void
)
{
int
loop
(
void
)
{
//on_start ();
//on_start ();
tgl_set_callback
(
&
upd_cb
);
tgl_set_callback
(
&
upd_cb
);
//tgl_state.temp_key_expire_time = 60;
tgl_init
();
tgl_init
();
if
(
binlog_enabled
)
{
if
(
binlog_enabled
)
{
...
@@ -731,6 +732,7 @@ int loop (void) {
...
@@ -731,6 +732,7 @@ int loop (void) {
tgl_do_get_difference
(
sync_from_start
,
get_difference_callback
,
0
);
tgl_do_get_difference
(
sync_from_start
,
get_difference_callback
,
0
);
net_loop
(
0
,
dgot
);
net_loop
(
0
,
dgot
);
assert
(
!
(
tgl_state
.
locks
&
TGL_LOCK_DIFF
));
assert
(
!
(
tgl_state
.
locks
&
TGL_LOCK_DIFF
));
tgl_state
.
started
=
1
;
if
(
wait_dialog_list
)
{
if
(
wait_dialog_list
)
{
d_got_ok
=
0
;
d_got_ok
=
0
;
tgl_do_get_dialog_list
(
dlist_cb
,
0
);
tgl_do_get_dialog_list
(
dlist_cb
,
0
);
...
...
mtproto-client.c
View file @
1789aa3c
...
@@ -906,7 +906,9 @@ static void work_new_session_created (struct connection *c, long long msg_id UU)
...
@@ -906,7 +906,9 @@ static void work_new_session_created (struct connection *c, long long msg_id UU)
//DC->session_id = fetch_long ();
//DC->session_id = fetch_long ();
fetch_long
();
// unique_id
fetch_long
();
// unique_id
tgl_state
.
net_methods
->
get_dc
(
c
)
->
server_salt
=
fetch_long
();
tgl_state
.
net_methods
->
get_dc
(
c
)
->
server_salt
=
fetch_long
();
if
(
tgl_state
.
started
&&
!
(
tgl_state
.
locks
&
TGL_LOCK_DIFF
))
{
tgl_do_get_difference
(
0
,
0
,
0
);
}
}
}
static
void
work_msgs_ack
(
struct
connection
*
c
UU
,
long
long
msg_id
UU
)
{
static
void
work_msgs_ack
(
struct
connection
*
c
UU
,
long
long
msg_id
UU
)
{
...
...
tgl.h
View file @
1789aa3c
...
@@ -134,6 +134,7 @@ struct tgl_state {
...
@@ -134,6 +134,7 @@ struct tgl_state {
int
unread_messages
;
int
unread_messages
;
int
active_queries
;
int
active_queries
;
int
max_msg_id
;
int
max_msg_id
;
int
started
;
long
long
locks
;
long
long
locks
;
struct
tgl_dc
*
DC_list
[
TGL_MAX_DC_NUM
];
struct
tgl_dc
*
DC_list
[
TGL_MAX_DC_NUM
];
...
...
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