diff options
author | Sunil Nimmagadda <sunil@nimmagadda.net> | 2014-04-02 11:40:11 +0500 |
---|---|---|
committer | Sunil Nimmagadda <sunil@nimmagadda.net> | 2014-04-02 11:40:11 +0500 |
commit | 24d1d985d4756f89540b9d6a6a916e36c91cecdf (patch) | |
tree | fa426f4728e52044ad6a3aec519ecab9099aefe5 | |
parent | 8ca92e98d738d2f73731728608bc1d0765aa5a0d (diff) |
Move it closer to list.
-rw-r--r-- | maildrop.c | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -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"); |