diff options
author | Steve Holme <steve_holme@hotmail.com> | 2012-05-27 10:54:13 +0100 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2012-05-27 10:54:13 +0100 |
commit | c6495bccbf7485d9088e994bf27cb2efd3b29d47 (patch) | |
tree | 7501705f843eea288c0c57d4245711a990a8c512 /lib/pop3.h | |
parent | f95f19e85495572541134ecaf3f39369f1e4e1cd (diff) | |
download | curl-c6495bccbf7485d9088e994bf27cb2efd3b29d47.tar.gz |
pop3: Code tidy up before the introduction of authentication code
Moved EOB definition into header file.
Switched the logic around in pop3_endofresp() to allow for the
introduction of auth-mechanism detection.
Repositioned second and third function variables where they will fit
within the 78 character line limit.
Tidied up some comments.
Diffstat (limited to 'lib/pop3.h')
-rw-r--r-- | lib/pop3.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/pop3.h b/lib/pop3.h index e30c3b3b2..99b514e4c 100644 --- a/lib/pop3.h +++ b/lib/pop3.h @@ -26,15 +26,15 @@ * POP3 unique setup ***************************************************************************/ typedef enum { - POP3_STOP, /* do nothing state, stops the state machine */ - POP3_SERVERGREET, /* waiting for the initial greeting immediately after - a connect */ + POP3_STOP, /* do nothing state, stops the state machine */ + POP3_SERVERGREET, /* waiting for the initial greeting immediately after + a connect */ POP3_USER, POP3_PASS, POP3_STARTTLS, POP3_COMMAND, POP3_QUIT, - POP3_LAST /* never used */ + POP3_LAST /* never used */ } pop3state; /* pop3_conn is used for struct connection-oriented data in the connectdata @@ -52,12 +52,12 @@ struct pop3_conn { extern const struct Curl_handler Curl_handler_pop3; extern const struct Curl_handler Curl_handler_pop3s; -/* - * This function scans the body after the end-of-body and writes everything - * until the end is found. - */ -CURLcode Curl_pop3_write(struct connectdata *conn, - char *str, - size_t nread); +/* This is the 5-bytes End-Of-Body marker for POP3 */ +#define POP3_EOB "\x0d\x0a\x2e\x0d\x0a" +#define POP3_EOB_LEN 5 + +/* This function scans the body after the end-of-body and writes everything + * until the end is found */ +CURLcode Curl_pop3_write(struct connectdata *conn, char *str, size_t nread); #endif /* HEADER_CURL_POP3_H */ |