(imap4d_store0): Use fetch_flags0.
Showing
1 changed file
with
6 additions
and
8 deletions
... | @@ -107,7 +107,6 @@ imap4d_store0 (char *arg, int isuid, char *resp, size_t resplen) | ... | @@ -107,7 +107,6 @@ imap4d_store0 (char *arg, int isuid, char *resp, size_t resplen) |
107 | message_t msg = NULL; | 107 | message_t msg = NULL; |
108 | attribute_t attr = NULL; | 108 | attribute_t attr = NULL; |
109 | char *items = strdup (sp); /* Don't use the orignal list. */ | 109 | char *items = strdup (sp); /* Don't use the orignal list. */ |
110 | char *flags = strdup (""); | ||
111 | int first = 1; | 110 | int first = 1; |
112 | size_t msgno; | 111 | size_t msgno; |
113 | char *p = items; | 112 | char *p = items; |
... | @@ -140,17 +139,16 @@ imap4d_store0 (char *arg, int isuid, char *resp, size_t resplen) | ... | @@ -140,17 +139,16 @@ imap4d_store0 (char *arg, int isuid, char *resp, size_t resplen) |
140 | attribute_set_flags (attr, type); | 139 | attribute_set_flags (attr, type); |
141 | } | 140 | } |
142 | attribute_set_flags (attr, MU_ATTRIBUTE_MODIFIED); | 141 | attribute_set_flags (attr, MU_ATTRIBUTE_MODIFIED); |
143 | flags = realloc (flags, strlen (flags) + strlen (item) + 2); | ||
144 | if (*flags) | ||
145 | strcat (flags, " "); | ||
146 | strcat (flags, item); | ||
147 | } | 142 | } |
148 | } | 143 | } |
149 | } | 144 | } |
150 | if (ack && *flags) | 145 | if (ack) |
151 | util_out (RESP_NONE, "%d FETCH FLAGS (%s)", msgno, flags); | 146 | { |
147 | util_send ("* %d FETCH ", msgno); | ||
148 | fetch_flags0 ("FLAGS", msg, isuid); | ||
149 | util_send ("\n"); | ||
150 | } | ||
152 | free (p); | 151 | free (p); |
153 | free (flags); | ||
154 | /* Update the flags of uid table. */ | 152 | /* Update the flags of uid table. */ |
155 | imap4d_sync_flags (set[i]); | 153 | imap4d_sync_flags (set[i]); |
156 | } | 154 | } | ... | ... |
-
Please register or sign in to post a comment