const char *idstr, /* command id to wait for */
const char *fmt, ...)
{
- CURLcode res;
+ CURLcode result;
struct imap_conn *imapc = &conn->proto.imapc;
va_list ap;
va_start(ap, fmt);
- imapc->idstr = idstr;
+ imapc->resptag = idstr;
- res = Curl_pp_vsendf(&imapc->pp, fmt, ap);
+ result = Curl_pp_vsendf(&imapc->pp, fmt, ap);
va_end(ap);
- return res;
+ return result;
}
static const char *getcmdid(struct connectdata *conn)
char *line = pp->linestart_resp;
size_t len = pp->nread_resp;
struct imap_conn *imapc = &pp->conn->proto.imapc;
- const char *id = imapc->idstr;
+ const char *id = imapc->resptag;
size_t id_len = strlen(id);
size_t wordlen;
char *user = imap_atom(imap->user);
char *passwd = imap_atom(imap->passwd);
- /* send USER and password */
+ /* Send USER and password */
result = imap_sendf(conn, str, "%s LOGIN %s %s", str,
user ? user : "", passwd ? passwd : "");
state(conn, IMAP_SERVERGREET);
/* Start off with an id of '*' */
- imapc->idstr = "*";
+ imapc->resptag = "*";
result = imap_multi_statemach(conn, done);
unsigned int authmechs; /* Accepted authentication mechanisms */
unsigned int authused; /* Auth mechanism used for the connection */
imapstate state; /* Always use imap.c:state() to change state! */
- int cmdid; /* Next command ID */
- const char *idstr; /* String based response ID to wait for */
+ int cmdid; /* Last used command ID */
+ const char *resptag; /* Response tag to wait for */
bool ssldone; /* Is connect() over SSL done? */
bool login_disabled; /* LOGIN command explicitly disabled by server */
};