imap: Small variable rename in preparation for upcoming change

Renamed a couple of variables and updated some comments in
preparation for upcoming command id / response tag change.
This commit is contained in:
Steve Holme 2013-02-06 22:22:57 +00:00
parent 632e50ca8d
commit cecb9c0f71
2 changed files with 9 additions and 9 deletions

View File

@ -215,18 +215,18 @@ static CURLcode imap_sendf(struct connectdata *conn,
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)
@ -330,7 +330,7 @@ static int imap_endofresp(struct pingpong *pp, int *resp)
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;
@ -511,7 +511,7 @@ static CURLcode imap_state_login(struct connectdata *conn)
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 : "");
@ -1390,7 +1390,7 @@ static CURLcode imap_connect(struct connectdata *conn, bool *done)
state(conn, IMAP_SERVERGREET);
/* Start off with an id of '*' */
imapc->idstr = "*";
imapc->resptag = "*";
result = imap_multi_statemach(conn, done);

View File

@ -59,8 +59,8 @@ struct imap_conn {
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 */
};