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
d25f28db
Commit
d25f28db
authored
Sep 09, 2014
by
Vysheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed get history
parent
8fd26130
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
queries.c
queries.c
+6
-6
No files found.
queries.c
View file @
d25f28db
...
...
@@ -1152,7 +1152,7 @@ void tgl_do_mark_read (tgl_peer_id_t id, void (*callback)(void *callback_extra,
/* }}} */
/* {{{ Get history */
void
_tgl_do_get_history
(
tgl_peer_id_t
id
,
int
limit
,
int
offset
,
int
list_offset
,
int
list_size
,
struct
tgl_message
*
ML
[],
void
(
*
callback
)(
void
*
callback_extra
,
int
success
,
int
size
,
struct
tgl_message
*
list
[]),
void
*
callback_extra
);
void
_tgl_do_get_history
(
tgl_peer_id_t
id
,
int
limit
,
int
offset
,
int
max_id
,
int
list_offset
,
int
list_size
,
struct
tgl_message
*
ML
[],
void
(
*
callback
)(
void
*
callback_extra
,
int
success
,
int
size
,
struct
tgl_message
*
list
[]),
void
*
callback_extra
);
static
int
get_history_on_answer
(
struct
query
*
q
UU
)
{
int
count
=
-
1
;
int
i
;
...
...
@@ -1219,7 +1219,7 @@ static int get_history_on_answer (struct query *q UU) {
tfree
(
ML
,
sizeof
(
void
*
)
*
list_size
);
}
else
{
_tgl_do_get_history
(
id
,
limit
,
offset
,
list_offset
,
list_size
,
ML
,
q
->
callback
,
q
->
callback_extra
);
_tgl_do_get_history
(
id
,
limit
,
0
,
ML
[
list_offset
-
1
]
->
id
,
list_offset
,
list_size
,
ML
,
q
->
callback
,
q
->
callback_extra
);
}
return
0
;
}
...
...
@@ -1290,7 +1290,7 @@ void tgl_do_get_local_history_ext (tgl_peer_id_t id, int offset, int limit, void
void
_tgl_do_get_history
(
tgl_peer_id_t
id
,
int
limit
,
int
offset
,
int
list_offset
,
int
list_size
,
struct
tgl_message
*
ML
[],
void
(
*
callback
)(
void
*
callback_extra
,
int
success
,
int
size
,
struct
tgl_message
*
list
[]),
void
*
callback_extra
)
{
void
_tgl_do_get_history
(
tgl_peer_id_t
id
,
int
limit
,
int
offset
,
int
max_id
,
int
list_offset
,
int
list_size
,
struct
tgl_message
*
ML
[],
void
(
*
callback
)(
void
*
callback_extra
,
int
success
,
int
size
,
struct
tgl_message
*
list
[]),
void
*
callback_extra
)
{
void
**
T
=
talloc
(
sizeof
(
void
*
)
*
7
);
T
[
0
]
=
ML
;
T
[
1
]
=
(
void
*
)(
long
)
list_offset
;
...
...
@@ -1304,7 +1304,7 @@ void _tgl_do_get_history (tgl_peer_id_t id, int limit, int offset, int list_offs
out_int
(
CODE_messages_get_history
);
out_peer_id
(
id
);
out_int
(
offset
);
out_int
(
0
);
out_int
(
max_id
);
out_int
(
limit
);
tglq_send_query
(
tgl_state
.
DC_working
,
packet_ptr
-
packet_buffer
,
packet_buffer
,
&
get_history_methods
,
T
,
callback
,
callback_extra
);
}
...
...
@@ -1315,7 +1315,7 @@ void tgl_do_get_history (tgl_peer_id_t id, int limit, int offline_mode, void (*c
tgl_do_mark_read
(
id
,
0
,
0
);
return
;
}
_tgl_do_get_history
(
id
,
limit
,
0
,
0
,
0
,
0
,
callback
,
callback_extra
);
_tgl_do_get_history
(
id
,
limit
,
0
,
0
,
0
,
0
,
0
,
callback
,
callback_extra
);
}
void
tgl_do_get_history_ext
(
tgl_peer_id_t
id
,
int
offset
,
int
limit
,
int
offline_mode
,
void
(
*
callback
)(
void
*
callback_extra
,
int
success
,
int
size
,
struct
tgl_message
*
list
[]),
void
*
callback_extra
)
{
...
...
@@ -1324,7 +1324,7 @@ void tgl_do_get_history_ext (tgl_peer_id_t id, int offset, int limit, int offlin
tgl_do_mark_read
(
id
,
0
,
0
);
return
;
}
_tgl_do_get_history
(
id
,
limit
,
offset
,
0
,
0
,
0
,
callback
,
callback_extra
);
_tgl_do_get_history
(
id
,
limit
,
offset
,
0
,
0
,
0
,
0
,
callback
,
callback_extra
);
}
/* }}} */
...
...
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