]> granicus.if.org Git - curl/commitdiff
imap: Small variable rename in preparation for upcoming change
authorSteve Holme <steve_holme@hotmail.com>
Wed, 6 Feb 2013 22:22:57 +0000 (22:22 +0000)
committerSteve Holme <steve_holme@hotmail.com>
Wed, 6 Feb 2013 22:22:57 +0000 (22:22 +0000)
Renamed a couple of variables and updated some comments in
preparation for upcoming command id / response tag change.

lib/imap.c
lib/imap.h

index c7e138d120c92d60aaaf279da331572043630858..5f82782aea2cb7f2e230982f8c064939b9c11d4c 100644 (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);
 
index b37cdab83981e0007340a7a1a8de0655d787a32e..4a276c1510c777ab6a11523e2a2ed27617ffbc5a 100644 (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 */
 };