case 's': /* simple string */
s = va_arg(ap, gchar *);
c(printf("got string '%s'\n", s));
+ output_string:
if (*s) {
guchar mask = imapx_is_mask(s);
} else {
camel_stream_write((CamelStream *)ic->mem, "\"\"", 2);
}
+ if (encoded) {
+ g_free(encoded);
+ encoded = NULL;
+ }
break;
case 'f': /* imap folder name */
folder = va_arg(ap, CamelFolder *);
} else
encoded = camel_utf8_utf7 (full_name);
- camel_stream_printf((CamelStream *)ic->mem, "\"%s\"", encoded?encoded:"");
+ if (encoded) {
+ s = encoded;
+ goto output_string;
+ } else
+ camel_stream_write((CamelStream *)ic->mem, "\"\"", 2);
- g_free (encoded);
break;
case 'F': /* IMAP flags set */
f = va_arg(ap, guint32);