Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
47cc4c1772 | |||
3e146313a9 | |||
18ae21daad | |||
5f9c60ce4b |
@@ -62,7 +62,7 @@ typedef struct {
|
||||
gboolean msg_changed;
|
||||
|
||||
// Used by delta_process_connection_state
|
||||
int connection_state;
|
||||
// int connection_state;
|
||||
} ProcessRequest;
|
||||
|
||||
gboolean
|
||||
@@ -79,7 +79,7 @@ delta_process_incoming_message(void *data)
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
gboolean
|
||||
delta_process_connection_state(void *data)
|
||||
{
|
||||
@@ -95,14 +95,14 @@ delta_process_connection_state(void *data)
|
||||
);
|
||||
|
||||
if (pr->connection_state == MAX_DELTA_CONFIGURE) {
|
||||
purple_connection_set_state(pr->conn->pc, PURPLE_CONNECTED);
|
||||
|
||||
}
|
||||
|
||||
g_free(data);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
*/
|
||||
gboolean
|
||||
delta_process_fresh_messages(void *data)
|
||||
{
|
||||
@@ -183,8 +183,7 @@ delta_event_handler(void *context)
|
||||
dc_str_unref(warn);
|
||||
break;
|
||||
}
|
||||
case DC_EVENT_ERROR:
|
||||
case DC_EVENT_ERROR_NETWORK: {
|
||||
case DC_EVENT_ERROR: {
|
||||
int errcode = dc_event_get_data1_int(event);
|
||||
char *err = dc_event_get_data2_str(event);
|
||||
purple_debug_info(PLUGIN_ID, "ERROR from Delta: %d: %s\n", errcode, err);
|
||||
@@ -240,9 +239,10 @@ delta_event_handler(void *context)
|
||||
break;
|
||||
|
||||
case DC_EVENT_CONFIGURE_PROGRESS:
|
||||
pr = delta_build_process_request(conn);
|
||||
pr->connection_state = dc_event_get_data1_int(event);
|
||||
purple_timeout_add(0, delta_process_connection_state, pr);
|
||||
//pr = delta_build_process_request(conn);
|
||||
//pr->connection_state = dc_event_get_data1_int(event);
|
||||
//purple_timeout_add(0, delta_process_connection_state, pr);
|
||||
purple_debug_info(PLUGIN_ID, "Configure progress: %d\n", dc_event_get_data1_int(event));
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -324,6 +324,8 @@ delta_connection_start_login(PurpleConnection *pc)
|
||||
dc_start_io(mailbox);
|
||||
dc_maybe_network(mailbox);
|
||||
|
||||
purple_connection_set_state(pc, PURPLE_CONNECTED);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -536,7 +538,7 @@ delta_recv_im(DeltaConnectionData *conn, dc_msg_t *msg)
|
||||
text = g_strdup_printf("<img id='%d'><br/>%s", image_id, text);
|
||||
}
|
||||
|
||||
char *name = dc_contact_get_name(from);
|
||||
char *name = dc_contact_get_display_name(from);
|
||||
int msglen = strlen(name) + 3 + strlen(text);
|
||||
|
||||
char *msgtext = malloc(msglen);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
#define DELTA_CONNECTION_H
|
||||
|
||||
#include <glib.h>
|
||||
#include <deltachat/deltachat.h>
|
||||
#include <deltachat.h>
|
||||
#include <pthread.h>
|
||||
|
||||
struct _PurpleConnection;
|
||||
|
@@ -205,7 +205,11 @@ static PurplePluginProtocolInfo extra_info =
|
||||
NULL, /* set_public_alias */
|
||||
NULL, /* get_public_alias */
|
||||
NULL, /* add_buddy_with_invite */
|
||||
NULL /* add_buddies_with_invite */
|
||||
NULL, /* add_buddies_with_invite */
|
||||
// 2.14
|
||||
NULL, /* get_cb_alias */
|
||||
NULL, /* chat_can_send_file */
|
||||
NULL /* some send file */
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user