mutt stable branch with some hacks
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

merge stable

+21 -1
+1
imap/command.c
··· 464 464 (idata->reopen & IMAP_REOPEN_ALLOW)) 465 465 { 466 466 mx_fastclose_mailbox (idata->ctx); 467 + mutt_socket_close (idata->conn); 467 468 mutt_error (_("Mailbox closed")); 468 469 mutt_sleep (1); 469 470 idata->state = IMAP_DISCONNECTED;
+20 -1
imap/imap.c
··· 290 290 imap_free_header_data ((IMAP_HEADER_DATA**)&h->data); 291 291 } 292 292 else 293 + { 293 294 h->index = i; 295 + /* Mutt has several places where it turns off h->active as a 296 + * hack. For example to avoid FLAG updates, or to exclude from 297 + * imap_exec_msgset. 298 + * 299 + * Unfortunately, when a reopen is allowed and the IMAP_EXPUNGE_PENDING 300 + * flag becomes set (e.g. a flag update to a modified header), 301 + * this function will be called by imap_cmd_finish(). 302 + * 303 + * The mx_update_tables() will free and remove these "inactive" headers, 304 + * despite that an EXPUNGE was not received for them. 305 + * This would result in memory leaks and segfaults due to dangling 306 + * pointers in the msn_index and uid_hash. 307 + * 308 + * So this is another hack to work around the hacks. We don't want to 309 + * remove the messages, so make sure active is on. 310 + */ 311 + h->active = 1; 312 + } 294 313 } 295 314 296 315 #if USE_HCACHE ··· 1600 1619 { 1601 1620 /* Send commands to previous server. Sorting the buffy list 1602 1621 * may prevent some infelicitous interleavings */ 1603 - if (imap_exec (lastdata, NULL, IMAP_CMD_FAIL_OK) == -1) 1622 + if (imap_exec (lastdata, NULL, IMAP_CMD_FAIL_OK | IMAP_CMD_POLL) == -1) 1604 1623 dprint (1, (debugfile, "Error polling mailboxes\n")); 1605 1624 1606 1625 lastdata = NULL;