summaryrefslogtreecommitdiff
path: root/maildrop.c
diff options
context:
space:
mode:
Diffstat (limited to 'maildrop.c')
-rw-r--r--maildrop.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/maildrop.c b/maildrop.c
index 4b9055c..f72e583 100644
--- a/maildrop.c
+++ b/maildrop.c
@@ -292,6 +292,19 @@ list(struct imsgev *iev, struct imsg *imsg, struct m_backend *mb)
}
static void
+do_list(unsigned int idx, size_t *sz, char *hash, size_t hash_sz)
+{
+ if (m.msgs_index[idx]->flags & F_DELE) {
+ *sz = 0;
+ strlcpy(hash, "", hash_sz);
+ return;
+ }
+
+ *sz = m.msgs_index[idx]->sz;
+ strlcpy(hash, m.msgs_index[idx]->hash, hash_sz);
+}
+
+static void
list_all(struct imsgev *iev, struct imsg *imsg, struct m_backend *mb)
{
struct list_res res;
@@ -326,19 +339,6 @@ list_all(struct imsgev *iev, struct imsg *imsg, struct m_backend *mb)
}
static void
-do_list(unsigned int idx, size_t *sz, char *hash, size_t hash_sz)
-{
- if (m.msgs_index[idx]->flags & F_DELE) {
- *sz = 0;
- strlcpy(hash, "", hash_sz);
- return;
- }
-
- *sz = m.msgs_index[idx]->sz;
- strlcpy(hash, m.msgs_index[idx]->hash, hash_sz);
-}
-
-static void
needfd(struct imsgev *iev)
{
fatalx("maildrop should never need an fd");