summaryrefslogtreecommitdiff
path: root/lib/imap.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/imap.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/imap.h')
-rw-r--r--lib/imap.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/imap.h b/lib/imap.h
index 8997b222c..784ee97e5 100644
--- a/lib/imap.h
+++ b/lib/imap.h
@@ -72,19 +72,19 @@ struct IMAP {
struct */
struct imap_conn {
struct pingpong pp;
- imapstate state; /* Always use imap.c:state() to change state! */
- bool ssldone; /* Is connect() over SSL done? */
- bool preauth; /* Is this connection PREAUTH? */
struct SASL sasl; /* SASL-related parameters */
- unsigned int preftype; /* Preferred authentication type */
- unsigned int cmdid; /* Last used command ID */
- char resptag[5]; /* Response tag to wait for */
- bool tls_supported; /* StartTLS capability supported by server */
- bool login_disabled; /* LOGIN command disabled by server */
- bool ir_supported; /* Initial response supported by server */
+ struct dynbuf dyn; /* for the IMAP commands */
char *mailbox; /* The last selected mailbox */
char *mailbox_uidvalidity; /* UIDVALIDITY parsed from select response */
- struct dynbuf dyn; /* for the IMAP commands */
+ imapstate state; /* Always use imap.c:state() to change state! */
+ char resptag[5]; /* Response tag to wait for */
+ unsigned char preftype; /* Preferred authentication type */
+ unsigned char cmdid; /* Last used command ID */
+ BIT(ssldone); /* Is connect() over SSL done? */
+ BIT(preauth); /* Is this connection PREAUTH? */
+ BIT(tls_supported); /* StartTLS capability supported by server */
+ BIT(login_disabled); /* LOGIN command disabled by server */
+ BIT(ir_supported); /* Initial response supported by server */
};
extern const struct Curl_handler Curl_handler_imap;
@@ -96,6 +96,6 @@ extern const struct Curl_handler Curl_handler_imaps;
/* Authentication type values */
#define IMAP_TYPE_NONE 0
-#define IMAP_TYPE_ANY ~0U
+#define IMAP_TYPE_ANY (IMAP_TYPE_CLEARTEXT|IMAP_TYPE_SASL)
#endif /* HEADER_CURL_IMAP_H */