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
62d3c07f
Commit
62d3c07f
authored
Oct 06, 2014
by
Vysheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated layer 17
parent
7a9764f2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
16 deletions
+20
-16
interface.c
interface.c
+1
-1
queries.c
queries.c
+16
-12
structures.c
structures.c
+3
-3
No files found.
interface.c
View file @
62d3c07f
...
...
@@ -2304,7 +2304,7 @@ void print_media (struct in_ev *ev, struct tgl_message_media *M) {
}
return
;
case
tgl_message_media_geo
:
mprintf
(
ev
,
"[geo] https://maps.google.com/?q=%.6lf,%.6lf"
,
M
->
geo
.
l
atitude
,
M
->
geo
.
long
itude
);
mprintf
(
ev
,
"[geo] https://maps.google.com/?q=%.6lf,%.6lf"
,
M
->
geo
.
l
ongitude
,
M
->
geo
.
lat
itude
);
return
;
case
tgl_message_media_contact
:
mprintf
(
ev
,
"[contact] "
);
...
...
queries.c
View file @
62d3c07f
...
...
@@ -994,13 +994,13 @@ void tgl_do_send_encr_msg_action (struct tgl_message *M, void (*callback)(void *
out_int
(
CODE_decrypted_message_service_l16
);
}
else
{
out_int
(
CODE_decrypted_message_service
);
}
out_long
(
M
->
id
);
out_random
(
15
+
4
*
(
lrand48
()
%
3
));
if
(
P
->
encr_chat
.
layer
>=
17
)
{
out_int
(
2
*
P
->
encr_chat
.
in_seq_no
+
(
P
->
encr_chat
.
admin_id
!=
tgl_state
.
our_id
));
out_int
(
2
*
P
->
encr_chat
.
out_seq_no
+
(
P
->
encr_chat
.
admin_id
==
tgl_state
.
our_id
));
}
out_long
(
M
->
id
);
static
int
buf
[
4
];
tglt_secure_random
(
buf
,
16
);
out_cstring
((
void
*
)
buf
,
16
);
switch
(
M
->
action
.
type
)
{
case
tgl_message_action_notify_layer
:
...
...
@@ -1044,14 +1044,14 @@ void tgl_do_send_encr_msg (struct tgl_message *M, void (*callback)(void *callbac
out_int
(
CODE_decrypted_message_l16
);
}
else
{
out_int
(
CODE_decrypted_message
);
}
out_long
(
M
->
id
);
out_random
(
15
+
4
*
(
lrand48
()
%
3
));
if
(
P
->
encr_chat
.
layer
>=
17
)
{
out_int
(
2
*
P
->
encr_chat
.
in_seq_no
+
(
P
->
encr_chat
.
admin_id
!=
tgl_state
.
our_id
));
out_int
(
2
*
P
->
encr_chat
.
out_seq_no
+
(
P
->
encr_chat
.
admin_id
==
tgl_state
.
our_id
));
out_int
(
0
);
}
out_long
(
M
->
id
);
static
int
buf
[
4
];
tglt_secure_random
(
buf
,
16
);
out_cstring
((
void
*
)
buf
,
16
);
out_cstring
((
void
*
)
M
->
message
,
M
->
message_len
);
out_int
(
CODE_decrypted_message_media_empty
);
encr_finish
(
&
P
->
encr_chat
);
...
...
@@ -1789,12 +1789,14 @@ static void send_part (struct send_file *f, void *callback, void *callback_extra
out_int
(
CODE_decrypted_message_l16
);
}
else
{
out_int
(
CODE_decrypted_message
);
}
out_long
(
r
);
out_random
(
15
+
4
*
(
lrand48
()
%
3
));
if
(
P
->
encr_chat
.
layer
>=
17
)
{
out_int
(
2
*
P
->
encr_chat
.
in_seq_no
+
(
P
->
encr_chat
.
admin_id
!=
tgl_state
.
our_id
));
out_int
(
2
*
P
->
encr_chat
.
out_seq_no
+
(
P
->
encr_chat
.
admin_id
==
tgl_state
.
our_id
)
+
2
);
out_int
(
0
);
}
out_long
(
r
);
out_random
(
15
+
4
*
(
lrand48
()
%
3
));
out_string
(
""
);
int
*
save_ptr
=
packet_ptr
;
if
(
f
->
media_type
==
CODE_input_media_uploaded_photo
)
{
...
...
@@ -2166,12 +2168,14 @@ void tgl_do_send_location(tgl_peer_id_t id, double latitude, double longitude, v
out_int
(
CODE_decrypted_message_l16
);
}
else
{
out_int
(
CODE_decrypted_message
);
}
out_long
(
r
);
out_random
(
15
+
4
*
(
lrand48
()
%
3
));
if
(
P
->
encr_chat
.
layer
>=
17
)
{
out_int
(
2
*
P
->
encr_chat
.
in_seq_no
+
(
P
->
encr_chat
.
admin_id
!=
tgl_state
.
our_id
));
out_int
(
2
*
P
->
encr_chat
.
out_seq_no
+
(
P
->
encr_chat
.
admin_id
==
tgl_state
.
our_id
)
+
2
);
out_int
(
0
);
}
out_long
(
r
);
out_random
(
15
+
4
*
(
lrand48
()
%
3
));
out_string
(
""
);
int
*
save_ptr
=
packet_ptr
;
out_int
(
CODE_decrypted_message_media_geo_point
);
...
...
structures.c
View file @
62d3c07f
...
...
@@ -1229,6 +1229,9 @@ void tglf_fetch_encrypted_message (struct tgl_message *M) {
}
assert
(
x
==
CODE_decrypted_message
||
x
==
CODE_decrypted_message_service
||
x
==
CODE_decrypted_message_l16
||
x
==
CODE_decrypted_message_service_l16
);
//assert (id == fetch_long ());
fetch_long
();
ll
=
prefetch_strlen
();
fetch_str
(
ll
);
// random_bytes
if
(
x
==
CODE_decrypted_message
||
x
==
CODE_decrypted_message_service
)
{
int
out_seq_no
=
fetch_int
();
int
in_seq_no
=
fetch_int
();
...
...
@@ -1247,9 +1250,6 @@ void tglf_fetch_encrypted_message (struct tgl_message *M) {
}
else
{
P
->
encr_chat
.
in_seq_no
++
;
}
fetch_long
();
ll
=
prefetch_strlen
();
fetch_str
(
ll
);
// random_bytes
if
(
x
==
CODE_decrypted_message
||
x
==
CODE_decrypted_message_l16
)
{
l
=
prefetch_strlen
();
s
=
fetch_str
(
l
);
...
...
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