X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=pop%2Fpop.c;h=a8c26162712a9121e348df4f58e200c8c416660f;hp=bba466f36e8aa5509accf98b55cf824dbb1c866e;hb=108f3c7ab59844591f7540347914ea57be5245e2;hpb=238b70e39b78f585c586bd51aef41988b3cc73d1 diff --git a/pop/pop.c b/pop/pop.c index bba466f..a8c2616 100644 --- a/pop/pop.c +++ b/pop/pop.c @@ -11,21 +11,21 @@ # include "config.h" #endif +#include +#include + #include #include #include #include +#include + +#include #include "mutt.h" #include "mx.h" #include "pop.h" -#include "mutt_crypt.h" -#include "mutt_curses.h" - -#include "lib/debug.h" - -#include -#include +#include /* write line to file */ static int fetch_message (char *line, void *file) @@ -62,7 +62,7 @@ static pop_query_status pop_read_header (POP_DATA * pop_data, HEADER * h) return PFD_FUNCT_ERROR; } - snprintf (buf, sizeof (buf), "LIST %d\r\n", h->refno); + snprintf (buf, sizeof (buf), "string_list_t %d\r\n", h->refno); ret = pop_query (pop_data, buf, sizeof (buf)); if (ret == PQ_OK) { sscanf (buf, "+OK %d %ld", &index, &length); @@ -142,7 +142,7 @@ static int fetch_uidl (char *line, void *data) mx_alloc_memory (ctx); ctx->msgcount++; - ctx->hdrs[i] = mutt_new_header (); + ctx->hdrs[i] = header_new(); ctx->hdrs[i]->data = m_strdup(line); } else if (ctx->hdrs[i]->index != index - 1) @@ -217,7 +217,7 @@ static int pop_fetch_headers (CONTEXT * ctx) if (ret != PQ_OK) { for (i = ctx->msgcount; i < new_count; i++) - mutt_free_header (&ctx->hdrs[i]); + header_delete(&ctx->hdrs[i]); return ret; } @@ -409,7 +409,7 @@ int pop_fetch_message (MESSAGE * msg, CONTEXT * ctx, int msgno) cache->path = m_strdup(path); rewind (msg->fp); uidl = h->data; - mutt_free_envelope (&h->env); + envelope_delete(&h->env); h->env = mutt_read_rfc822_header (msg->fp, h, 0, 0); h->data = uidl; h->lines = 0; @@ -422,8 +422,7 @@ int pop_fetch_message (MESSAGE * msg, CONTEXT * ctx, int msgno) h->content->length = ftello (msg->fp) - h->content->offset; /* This needs to be done in case this is a multipart message */ - if (!WithCrypto) - h->security = crypt_query (h->content); + h->security = crypt_query (h->content); mutt_clear_error (); rewind (msg->fp);