- if (get_imap_response(nsc, NULL, NULL, errstr) != OK)
+ if (get_imap_response(nsc, NULL, NULL, &line, 1, errstr) != OK)
+ return NOTOK;
+ /*
+ * We MIGHT get a capability response here. If so, be sure we
+ * parse it.
+ */
+
+ if (has_prefix(line, "OK [CAPABILITY ")) {
+ char *p = line + 15, *q;
+ q = strchr(p, ']');
+
+ if (q)
+ parse_capability(p, q - p);
+ }
+
+ break;
+
+ /*
+ * Cancel an authentication dialog
+ */
+
+ case NETSEC_SASL_CANCEL:
+ rc = netsec_printf(nsc, errstr, "*\r\n");
+ if (rc == OK)
+ rc = netsec_flush(nsc, errstr);
+ if (rc != OK)