fixed detailed info

This commit is contained in:
Vysheng 2013-11-25 21:21:08 +04:00
parent d96450cd09
commit d095e607c2
3 changed files with 18 additions and 6 deletions

View File

@ -43,7 +43,7 @@
#include "mtproto-common.h" #include "mtproto-common.h"
#define ALLOW_MULT 1 //#define ALLOW_MULT 1
char *default_prompt = "> "; char *default_prompt = "> ";
int unread_messages; int unread_messages;

View File

@ -1431,14 +1431,21 @@ void work_pong (struct connection *c UU, long long msg_id UU) {
fetch_long (); // ping_id fetch_long (); // ping_id
} }
void work_detained_info (struct connection *c UU, long long msg_id UU) { void work_detailed_info (struct connection *c UU, long long msg_id UU) {
assert (fetch_int () == CODE_msg_detained_info); assert (fetch_int () == CODE_msg_detailed_info);
fetch_long (); // msg_id fetch_long (); // msg_id
fetch_long (); // answer_msg_id fetch_long (); // answer_msg_id
fetch_int (); // bytes fetch_int (); // bytes
fetch_int (); // status fetch_int (); // status
} }
void work_new_detailed_info (struct connection *c UU, long long msg_id UU) {
assert (fetch_int () == CODE_msg_detailed_info);
fetch_long (); // answer_msg_id
fetch_int (); // bytes
fetch_int (); // status
}
void work_updates_to_long (struct connection *c UU, long long msg_id UU) { void work_updates_to_long (struct connection *c UU, long long msg_id UU) {
assert (fetch_int () == (int)CODE_updates_too_long); assert (fetch_int () == (int)CODE_updates_too_long);
logprintf ("updates to long... Getting difference\n"); logprintf ("updates to long... Getting difference\n");
@ -1484,8 +1491,11 @@ void rpc_execute_answer (struct connection *c, long long msg_id UU) {
case CODE_pong: case CODE_pong:
work_pong (c, msg_id); work_pong (c, msg_id);
return; return;
case CODE_msg_detained_info: case CODE_msg_detailed_info:
work_detained_info (c, msg_id); work_detailed_info (c, msg_id);
return;
case CODE_msg_new_detailed_info:
work_new_detailed_info (c, msg_id);
return; return;
case CODE_updates_too_long: case CODE_updates_too_long:
work_updates_to_long (c, msg_id); work_updates_to_long (c, msg_id);

View File

@ -78,7 +78,9 @@
#define CODE_peer_notify_settings_old 0xddbcd4a5 #define CODE_peer_notify_settings_old 0xddbcd4a5
#define CODE_user_profile_photo_old 0x990d1493 #define CODE_user_profile_photo_old 0x990d1493
#define CODE_msg_detained_info 0x276d3ec6 #define CODE_msg_new_detailed_info 0x809db6df
#define CODE_msg_detailed_info 0x276d3ec6
/* not really a limit, for struct encrypted_message only */ /* not really a limit, for struct encrypted_message only */
// #define MAX_MESSAGE_INTS 16384 // #define MAX_MESSAGE_INTS 16384
#define MAX_MESSAGE_INTS 1048576 #define MAX_MESSAGE_INTS 1048576