imap4d: revamp namespace translation
Instead of translating names to full mailbox URLs, translate them to the filesystem pathname and record (mu_record_t) that should be used when creating the mailbox. Never use mu_mailbox_create_default. This patch also fixes memory leaks in some functions (the return value from namespace_get_url was never freed). * imap4d/imap4d.h (namespace_get_url): Remove. (namespace_get_name): New proto. * imap4d/namespace.c (namespace_init): Always intialize the pfx->record member. This requires that the default record be initialized. (namespace_get_url): Remove. (namespace_get_name): New function. * imap4d/create.c: Use namespace_get_name and mu_mailbox_create_from_record to create mailboxes. Fix folder creation. * imap4d/append.c: Use namespace_get_name and mu_mailbox_create_from_record to create mailboxes. * imap4d/copy.c: Likewise. * imap4d/delete.c: Likewise. * imap4d/quota.c: Likewise. * imap4d/rename.c: Likewise. * imap4d/status.c: Likewise.
Showing
9 changed files
with
81 additions
and
68 deletions
-
Please register or sign in to post a comment