some fixes. updated tgl

This commit is contained in:
vvaltman 2015-04-24 12:38:21 +03:00
parent 443412cded
commit 232a9f12d9
4 changed files with 11 additions and 11 deletions

View File

@ -41,10 +41,10 @@ ${AUTO}/scheme2.tl: ${AUTO}/scheme.tl ${EXE}/tl-parser
${EXE}/tl-parser -E ${AUTO}/scheme.tl 2> $@ || ( cat $@ && rm $@ && false )
${AUTO}/auto-%.c: ${AUTO}/scheme.tlo ${EXE}/generate auto/constants.h ${AUTO}/auto-%.h | create_dirs_and_headers
${EXE}/generate ${AUTO}/scheme.tlo -g $(patsubst ${AUTO}/auto-%.c,%,$@) > $@ || rm $@
${EXE}/generate -g $(patsubst ${AUTO}/auto-%.c,%,$@) ${AUTO}/scheme.tlo > $@ || rm $@
${AUTO}/auto-%.h: ${AUTO}/scheme.tlo ${EXE}/generate
${EXE}/generate ${AUTO}/scheme.tlo -g $(patsubst ${AUTO}/auto-%.h,%-header,$@) > $@ || rm $@
${EXE}/generate -g $(patsubst ${AUTO}/auto-%.h,%-header,$@) ${AUTO}/scheme.tlo > $@ || rm $@
${AUTO}/constants.h: ${AUTO}/scheme2.tl ${srcdir}/tgl/gen_constants_h.awk
awk -f ${srcdir}/tgl/gen_constants_h.awk < $< > $@

View File

@ -725,7 +725,7 @@ void do_send_typing_abort (int arg_num, struct arg args[], struct in_ev *ev) {
void do_rename_chat (int arg_num, struct arg args[], struct in_ev *ev) {
assert (arg_num == 2);
if (ev) { ev->refcnt ++; }
tgl_do_rename_chat (TLS, args[0].P->id, args[1].str, print_msg_success_gw, ev);
tgl_do_rename_chat (TLS, args[0].P->id, args[1].str, print_success_gw, ev);
}
#define DO_LOAD_PHOTO(tp,act,actf) \
@ -912,13 +912,13 @@ void do_secret_chat_rekey (int arg_num, struct arg args[], struct in_ev *ev) {
void do_chat_add_user (int arg_num, struct arg args[], struct in_ev *ev) {
assert (arg_num == 3);
if (ev) { ev->refcnt ++; }
tgl_do_add_user_to_chat (TLS, args[0].P->id, args[1].P->id, args[2].num != NOT_FOUND ? args[2].num : 100, print_msg_success_gw, ev);
tgl_do_add_user_to_chat (TLS, args[0].P->id, args[1].P->id, args[2].num != NOT_FOUND ? args[2].num : 100, print_success_gw, ev);
}
void do_chat_del_user (int arg_num, struct arg args[], struct in_ev *ev) {
assert (arg_num == 2);
if (ev) { ev->refcnt ++; }
tgl_do_del_user_from_chat (TLS, args[0].P->id, args[1].P->id, print_msg_success_gw, ev);
tgl_do_del_user_from_chat (TLS, args[0].P->id, args[1].P->id, print_success_gw, ev);
}
void do_status_online (int arg_num, struct arg args[], struct in_ev *ev) {
@ -986,7 +986,7 @@ void do_create_group_chat (int arg_num, struct arg args[], struct in_ev *ev) {
}
if (ev) { ev->refcnt ++; }
tgl_do_create_group_chat_ex (TLS, arg_num - 1, ids, args[0].str, print_msg_success_gw, ev);
tgl_do_create_group_chat_ex (TLS, arg_num - 1, ids, args[0].str, print_success_gw, ev);
}
void do_chat_set_photo (int arg_num, struct arg args[], struct in_ev *ev) {

View File

@ -889,7 +889,7 @@ void lua_do_all (void) {
p += 2;
break;
case lq_rename_chat:
tgl_do_rename_chat (TLS, ((tgl_peer_t *)lua_ptr[p + 1])->id, lua_ptr[p + 2], lua_msg_cb, lua_ptr[p]);
tgl_do_rename_chat (TLS, ((tgl_peer_t *)lua_ptr[p + 1])->id, lua_ptr[p + 2], lua_empty_cb, lua_ptr[p]);
free (lua_ptr[p + 2]);
p += 3;
break;
@ -977,11 +977,11 @@ void lua_do_all (void) {
p += 3;
break;
case lq_chat_add_user:
tgl_do_add_user_to_chat (TLS, ((tgl_peer_t *)lua_ptr[p + 1])->id, ((tgl_peer_t *)lua_ptr[p + 2])->id, 10, lua_msg_cb, lua_ptr[p]);
tgl_do_add_user_to_chat (TLS, ((tgl_peer_t *)lua_ptr[p + 1])->id, ((tgl_peer_t *)lua_ptr[p + 2])->id, 10, lua_empty_cb, lua_ptr[p]);
p += 3;
break;
case lq_chat_del_user:
tgl_do_del_user_from_chat (TLS, ((tgl_peer_t *)lua_ptr[p + 1])->id, ((tgl_peer_t *)lua_ptr[p + 2])->id, lua_msg_cb, lua_ptr[p]);
tgl_do_del_user_from_chat (TLS, ((tgl_peer_t *)lua_ptr[p + 1])->id, ((tgl_peer_t *)lua_ptr[p + 2])->id, lua_empty_cb, lua_ptr[p]);
p += 3;
break;
case lq_add_contact:
@ -1044,7 +1044,7 @@ void lua_do_all (void) {
break;
case lq_create_group_chat:
s = lua_ptr[p + 2];
tgl_do_create_group_chat (TLS, ((tgl_peer_t *)lua_ptr[p + 1])->id, s, lua_msg_cb, lua_ptr[p]);
tgl_do_create_group_chat (TLS, ((tgl_peer_t *)lua_ptr[p + 1])->id, s, lua_empty_cb, lua_ptr[p]);
free (s);
p += 3;
break;

2
tgl

@ -1 +1 @@
Subproject commit 58c5c6a57272773df63e285162536f4ce53c5230
Subproject commit 03436dc71faa8122012a4b5e2035d1ac2cdb6648