mirror of
https://github.com/curl/curl.git
synced 2024-11-27 05:50:21 +08:00
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:
parent
632e50ca8d
commit
cecb9c0f71
14
lib/imap.c
14
lib/imap.c
@ -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);
|
||||
|
||||
|
@ -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 */
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user