X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=buffy.c;h=6293bbb760c3a4beb81f21cef0ddfb292fad19a8;hp=ac8ef46af6e1d0ba5c92491303857ece9db8dc7b;hb=60f4017cfee7116f7945c2945965c0537570a3d3;hpb=a8477ebaa09990b3688164cbe5cf661c4189541d diff --git a/buffy.c b/buffy.c index ac8ef46..6293bbb 100644 --- a/buffy.c +++ b/buffy.c @@ -16,6 +16,7 @@ #include "mutt.h" #include "buffy.h" +#include "buffer.h" #include "mx.h" #include "mh.h" #include "sidebar.h" @@ -169,8 +170,8 @@ void buffy_update_mailbox (BUFFY * b) /* func to free buffy for list_del() */ static void buffy_free (BUFFY** p) { - FREE(&(*p)->path); - FREE(p); + mem_free(&(*p)->path); + mem_free(p); } int buffy_lookup (const char* path) { @@ -198,8 +199,9 @@ int buffy_parse_mailboxes (BUFFER * path, BUFFER * s, unsigned long data, mutt_extract_token (path, s, 0); strfcpy (buf, path->data, sizeof (buf)); - if (data == M_UNMAILBOXES && str_eq (buf, "*") == 0) { + if (data == M_UNMAILBOXES && str_eq (buf, "*")) { list_del (&Incoming, (list_del_t*) buffy_free); + sidebar_draw (CurrentMenu); return 0; } @@ -219,7 +221,7 @@ int buffy_parse_mailboxes (BUFFER * path, BUFFER * s, unsigned long data, } if (i < 0) { - tmp = safe_calloc (1, sizeof (BUFFY)); + tmp = mem_calloc (1, sizeof (BUFFY)); tmp->path = str_dup (buf); tmp->magic = 0; list_push_back (&Incoming, tmp); @@ -244,6 +246,7 @@ int buffy_parse_mailboxes (BUFFER * path, BUFFER * s, unsigned long data, tmp->size = 0; #endif /* BUFFY_SIZE */ } + sidebar_draw (CurrentMenu); return 0; } @@ -505,9 +508,6 @@ int buffy_list (void) int have_unnotified = BuffyNotify; int i = 0; - if (option (OPTFORCEBUFFYCHECK)) - buffy_check (1); - pos = 0; first = 1; buffylist[0] = 0;