summaryrefslogtreecommitdiff
path: root/lib/pop3.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2023-01-01 11:26:22 +0100
committerDaniel Stenberg <daniel@haxx.se>2023-01-04 15:36:36 +0100
commit1485e8921398f434c38528127c8ba0584324e10d (patch)
treebc7cda499da8b6e16e4bb366e91ed0d1a9685bc9 /lib/pop3.h
parent7ad8a7ba9ebdedceafe8859d3bd4d22ee447648d (diff)
downloadcurl-1485e8921398f434c38528127c8ba0584324e10d.tar.gz
misc: reduce struct and struct field sizes
- by using BIT() instead of bool - imap: shrink struct - ftp: make state 'unsigned char' - ftp: sort ftp_conn struct entries on size - urldata: use smaller fields for SSL version info storage - pop3: reduce the pop3_conn struct size - smtp: reduce the size of the smtp structs Closes #10186
Diffstat (limited to 'lib/pop3.h')
-rw-r--r--lib/pop3.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/pop3.h b/lib/pop3.h
index 726926d14..83f0f831e 100644
--- a/lib/pop3.h
+++ b/lib/pop3.h
@@ -62,16 +62,16 @@ struct POP3 {
struct pop3_conn {
struct pingpong pp;
pop3state state; /* Always use pop3.c:state() to change state! */
- bool ssldone; /* Is connect() over SSL done? */
- bool tls_supported; /* StartTLS capability supported by server */
size_t eob; /* Number of bytes of the EOB (End Of Body) that
have been received so far */
size_t strip; /* Number of bytes from the start to ignore as
non-body */
struct SASL sasl; /* SASL-related storage */
- unsigned int authtypes; /* Accepted authentication types */
- unsigned int preftype; /* Preferred authentication type */
char *apoptimestamp; /* APOP timestamp from the server greeting */
+ unsigned char authtypes; /* Accepted authentication types */
+ unsigned char preftype; /* Preferred authentication type */
+ BIT(ssldone); /* Is connect() over SSL done? */
+ BIT(tls_supported); /* StartTLS capability supported by server */
};
extern const struct Curl_handler Curl_handler_pop3;
@@ -84,7 +84,7 @@ extern const struct Curl_handler Curl_handler_pop3s;
/* Authentication type values */
#define POP3_TYPE_NONE 0
-#define POP3_TYPE_ANY ~0U
+#define POP3_TYPE_ANY (POP3_TYPE_CLEARTEXT|POP3_TYPE_APOP|POP3_TYPE_SASL)
/* This is the 5-bytes End-Of-Body marker for POP3 */
#define POP3_EOB "\x0d\x0a\x2e\x0d\x0a"