Update tgl version

This commit is contained in:
mjentsch 2015-07-11 17:41:50 +02:00
parent 5588de63f0
commit 51064e06b4
4 changed files with 8 additions and 6 deletions

View file

@ -140,10 +140,10 @@ void write_dc (struct tgl_dc *DC, void *extra) {
assert (DC->flags & TGLDCF_LOGGED_IN);
assert (write (auth_file_fd, &DC->port, 4) == 4);
int l = strlen (DC->ip);
assert (write (auth_file_fd, &DC->options[0]->port, 4) == 4);
int l = strlen (DC->options[0]->ip);
assert (write (auth_file_fd, &l, 4) == 4);
assert (write (auth_file_fd, DC->ip, l) == l);
assert (write (auth_file_fd, DC->options[0]->ip, l) == l);
assert (write (auth_file_fd, &DC->auth_key_id, 8) == 8);
assert (write (auth_file_fd, DC->auth_key, 256) == 256);
}
@ -637,7 +637,7 @@ static void telegram_send_sms (struct tgl_state *TLS) {
static int all_authorized (struct tgl_state *TLS) {
int i;
for (i = 0; i <= TLS->max_dc_num; i++) if (TLS->DC_list[i]) {
if (!tgl_authorized_dc (TLS, TLS->DC_list[i])) {
if (!tgl_signed_dc(TLS, TLS->DC_list[i]) && !tgl_authorized_dc (TLS, TLS->DC_list[i])) {
return 0;
}
}

2
tgl

@ -1 +1 @@
Subproject commit 195b2bcccdefd63282654c4d827315a48b677f97
Subproject commit 7bfaae149a08d1e205e5188d548c3d54e5a1ce64

View file

@ -162,7 +162,7 @@ static gboolean tgp_msg_send_schedule_cb (gpointer data) {
g_queue_pop_head (conn->out_messages);
// TODO: option for disable_msg_preview
tgl_do_send_message(D->TLS, D->to, D->msg, (int)strlen (D->msg), 0, tgp_msg_send_done, NULL);
tgl_do_send_message (D->TLS, D->to, D->msg, (int)strlen (D->msg), 0, NULL, tgp_msg_send_done, NULL);
tgp_msg_sending_free (D);
}
return FALSE;

View file

@ -313,6 +313,7 @@ static void restart_connection (struct connection *c) {
struct tgl_state *TLS = c->TLS;
connection_data *conn = TLS->ev_base;
/*
if (strcmp (c->ip, c->dc->ip) != 0 || c->port != c->dc->port) {
info ("DC%d address changed from %s:%d to %s:%d, updating settings.\n",
c->dc->id, c->ip, c->port, c->dc->ip, c->dc->port);
@ -322,6 +323,7 @@ static void restart_connection (struct connection *c) {
c->ip = strdup (c->dc->ip);
c->port = c->dc->port;
}
*/
if (tglt_get_double_time () - c->last_receive_time > 6 * PING_TIMEOUT) {
purple_connection_error_reason (conn->gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR,