Cleanup and add a few notes

This commit is contained in:
mjentsch 2016-02-07 18:18:03 +01:00
parent e8005883ab
commit 1070b5a6e7
5 changed files with 5 additions and 5 deletions

View file

@ -53,6 +53,8 @@
[super didConnect]; [super didConnect];
[self purpleAccount]; [self purpleAccount];
// FIXME: Crashed after going online
// Storing chats in the blist breaks Adium bookmarks. Adium doesn't // Storing chats in the blist breaks Adium bookmarks. Adium doesn't
// show those chats anyway, so we can just safely delete those. // show those chats anyway, so we can just safely delete those.
PurpleBlistNode *node = purple_blist_get_root(); PurpleBlistNode *node = purple_blist_get_root();

View file

@ -71,14 +71,11 @@ static void _update_buddy (struct tgl_state *TLS, tgl_peer_t *user, unsigned fla
if (flags & TGL_UPDATE_DELETED) { if (flags & TGL_UPDATE_DELETED) {
debug ("update deleted"); debug ("update deleted");
purple_blist_remove_buddy (buddy); purple_blist_remove_buddy (buddy);
} else { } else {
if (flags & TGL_UPDATE_CONTACT) { if (flags & TGL_UPDATE_CONTACT) {
debug ("update contact"); debug ("update contact");
purple_blist_alias_buddy (buddy, user->print_name); purple_blist_alias_buddy (buddy, user->print_name);
} }
if (flags & TGL_UPDATE_PHOTO) { if (flags & TGL_UPDATE_PHOTO) {
debug ("update photo"); debug ("update photo");
tgp_info_update_photo (buddy, user); tgp_info_update_photo (buddy, user);

View file

@ -245,11 +245,9 @@ void tgprpl_chat_join (PurpleConnection *gc, GHashTable *data) {
void *value = g_hash_table_lookup (data, "id"); void *value = g_hash_table_lookup (data, "id");
if (value && atoi (value)) { if (value && atoi (value)) {
tgl_peer_t *P = tgl_peer_get (gc_get_tls (gc), TGL_MK_CHAT(atoi (value))); tgl_peer_t *P = tgl_peer_get (gc_get_tls (gc), TGL_MK_CHAT(atoi (value)));
if (! P) { if (! P) {
P = tgl_peer_get (gc_get_tls (gc), TGL_MK_CHANNEL(atoi (value))); P = tgl_peer_get (gc_get_tls (gc), TGL_MK_CHANNEL(atoi (value)));
} }
if (P) { if (P) {
debug ("type=%d", tgl_get_peer_type (P->id)); debug ("type=%d", tgl_get_peer_type (P->id));
if (tgl_get_peer_type (P->id) == TGL_PEER_CHAT) { if (tgl_get_peer_type (P->id) == TGL_PEER_CHAT) {

View file

@ -90,6 +90,8 @@ static void tgprpl_xfer_recv_on_finished (struct tgl_state *TLS, void *_data, in
debug ("moving transferred file from tgl directory %s to selected target %s", selected, filename); debug ("moving transferred file from tgl directory %s to selected target %s", selected, filename);
g_unlink (selected); g_unlink (selected);
//FIXME: try to copy when this fails
g_rename (filename, selected); g_rename (filename, selected);
g_free (selected); g_free (selected);
} }

View file

@ -239,6 +239,7 @@ static int tgp_msg_send_split (struct tgl_state *TLS, const char *message, tgl_p
if (size > TGP_MAX_MSG_SIZE * TGP_DEFAULT_MAX_MSG_SPLIT_COUNT) { if (size > TGP_MAX_MSG_SIZE * TGP_DEFAULT_MAX_MSG_SPLIT_COUNT) {
return -E2BIG; return -E2BIG;
} }
while (size > start) { while (size > start) {
int end = start + (int)TGP_MAX_MSG_SIZE; int end = start + (int)TGP_MAX_MSG_SIZE;
if (end > size) { if (end > size) {