diff options
author | Kevin McCarthy <kevin@8t8.us> | 2017-01-28 18:48:08 -0800 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2017-01-28 18:48:08 -0800 |
commit | 9ae62494d8315234b48618301bc88d31b65f297e (patch) | |
tree | da7d55f61f98f947171cb676f1d0295e04c847d7 /pop.c | |
parent | f58e89c8466b36d11ecabddc8baf9727f59e6d69 (diff) |
Improve the label completion hash table usage.
Move the hash table inside the Context. Hook message arrival/deletion
to update the label hash.
Change the label hash to strdup keys.
Use hash_find_elem when updating the counter, to reduce unnecessary
add/delete operations.
Diffstat (limited to 'pop.c')
-rw-r--r-- | pop.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -632,10 +632,12 @@ static int pop_fetch_message (CONTEXT* ctx, MESSAGE* msg, int msgno) /* we replace envelop, key in subj_hash has to be updated as well */ if (ctx->subj_hash && h->env->real_subj) hash_delete (ctx->subj_hash, h->env->real_subj, h, NULL); + mutt_label_hash_remove (ctx, h); mutt_free_envelope (&h->env); h->env = mutt_read_rfc822_header (msg->fp, h, 0, 0); if (ctx->subj_hash && h->env->real_subj) hash_insert (ctx->subj_hash, h->env->real_subj, h, 1); + mutt_label_hash_add (ctx, h); h->data = uidl; h->lines = 0; |