Re: [PATCH 09/14] imap-send.c: remove namespace fields from struct imap
- From
Michael Haggerty <mhagger@alum.mit.edu>
- Date
- Jan 14, 2013, 09:31 UTC
- Message-ID
- <50F3D085.9080102@alum.mit.edu>
- In-Reply-To
- <20130114064347.GH3125@elie.Belkin>
On 01/14/2013 07:43 AM, Jonathan Nieder wrote:
Show 22 quoted lines
> Michael Haggerty wrote:
>
> [...]
>> @@ -722,9 +667,9 @@ static int get_cmd_result(struct imap_store *ctx, struct imap_cmd *tcmd)
>> }
>>
>> if (!strcmp("NAMESPACE", arg)) {
>> - imap->ns_personal = parse_list(&cmd);
>> - imap->ns_other = parse_list(&cmd);
>> - imap->ns_shared = parse_list(&cmd);
>> + skip_list(&cmd);
>> + skip_list(&cmd);
>> + skip_list(&cmd);
>
> This codepath would only be triggered if we emit a NAMESPACE command,
> right? If I am understanding correctly, a comment could make this
> less mystifying:
>
> /* rfc2342 NAMESPACE response. */
> skip_list(&cmd); /* Personal mailboxes */
> skip_list(&cmd); /* Others' mailboxes */
> skip_list(&cmd); /* Shared mailboxes */Yes, the comments are useful.
> Though that's probably academic since hopefully this if branch > will die soon. :)
Not by my hand :-) Maybe somebody more familiar with the IMAP protocol wants to take the code culling further...
Michael
-- Michael Haggerty mhagger@alum.mit.edu http://softwareswirl.blogspot.com/