Commit 232a9f12 authored by vvaltman's avatar vvaltman

some fixes. updated tgl

parent 443412cd
...@@ -41,10 +41,10 @@ ${AUTO}/scheme2.tl: ${AUTO}/scheme.tl ${EXE}/tl-parser ...@@ -41,10 +41,10 @@ ${AUTO}/scheme2.tl: ${AUTO}/scheme.tl ${EXE}/tl-parser
${EXE}/tl-parser -E ${AUTO}/scheme.tl 2> $@ || ( cat $@ && rm $@ && false ) ${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 ${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 ${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 ${AUTO}/constants.h: ${AUTO}/scheme2.tl ${srcdir}/tgl/gen_constants_h.awk
awk -f ${srcdir}/tgl/gen_constants_h.awk < $< > $@ awk -f ${srcdir}/tgl/gen_constants_h.awk < $< > $@
......
...@@ -725,7 +725,7 @@ void do_send_typing_abort (int arg_num, struct arg args[], struct in_ev *ev) { ...@@ -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) { void do_rename_chat (int arg_num, struct arg args[], struct in_ev *ev) {
assert (arg_num == 2); assert (arg_num == 2);
if (ev) { ev->refcnt ++; } 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) \ #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) { ...@@ -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) { void do_chat_add_user (int arg_num, struct arg args[], struct in_ev *ev) {
assert (arg_num == 3); assert (arg_num == 3);
if (ev) { ev->refcnt ++; } 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) { void do_chat_del_user (int arg_num, struct arg args[], struct in_ev *ev) {
assert (arg_num == 2); assert (arg_num == 2);
if (ev) { ev->refcnt ++; } 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) { 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) { ...@@ -986,7 +986,7 @@ void do_create_group_chat (int arg_num, struct arg args[], struct in_ev *ev) {
} }
if (ev) { ev->refcnt ++; } 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) { void do_chat_set_photo (int arg_num, struct arg args[], struct in_ev *ev) {
......
...@@ -889,7 +889,7 @@ void lua_do_all (void) { ...@@ -889,7 +889,7 @@ void lua_do_all (void) {
p += 2; p += 2;
break; break;
case lq_rename_chat: 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]); free (lua_ptr[p + 2]);
p += 3; p += 3;
break; break;
...@@ -977,11 +977,11 @@ void lua_do_all (void) { ...@@ -977,11 +977,11 @@ void lua_do_all (void) {
p += 3; p += 3;
break; break;
case lq_chat_add_user: 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; p += 3;
break; break;
case lq_chat_del_user: 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; p += 3;
break; break;
case lq_add_contact: case lq_add_contact:
...@@ -1044,7 +1044,7 @@ void lua_do_all (void) { ...@@ -1044,7 +1044,7 @@ void lua_do_all (void) {
break; break;
case lq_create_group_chat: case lq_create_group_chat:
s = lua_ptr[p + 2]; 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); free (s);
p += 3; p += 3;
break; break;
......
Subproject commit 58c5c6a57272773df63e285162536f4ce53c5230 Subproject commit 03436dc71faa8122012a4b5e2035d1ac2cdb6648
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment