Subject: problem when parsing this untaged response : * FLAGS (\Answered \Flagged....)

From: [email-masked]
Date: Wed, 22 Nov 2000 14:36:32 +0100

In the case of the following untagged response:
    * FLAGS (\Answered \Flagged....)
The fields user_flags[] of the mail_stream struct is never updated
because the underling expression in the following source are always
false.
 I think that the correction is : if (*s == '\\')
is it correct ?
can somebody help me ?

source extracted from the file "imapr1.c"
=============================
 } else if (!strcmp (reply->key,"FLAGS")) {
  /* flush old user flags if any */
  while ((i < NUSERFLAGS) && stream->user_flags[i])
   fs_give ((void **) &stream->user_flags[i++]);
  i = 0;   /* add flags */
  if (reply->text && (s = (char *) strtok (reply->text+1," )")))
   do {
    if (*s != '\\') stream->user_flags[i++] = cpystr (s);
   } while (s = (char *) strtok (NIL," )"));
 }

---

From: Mark Crispin <[email-masked]>
Date: Wed, 22 Nov 2000 07:38:23 -0800 (PST)

The code is correct as given in the code.

Flags which start with \ are not user flags, and therefore do not belong in
the stream->user_flags[].