From 6fdb9350ecdfd0dc7f65975ac9b4d6ba00161b19 Mon Sep 17 00:00:00 2001 From: Sunil Shetye Date: Tue, 3 May 2011 01:06:34 +0530 Subject: Do not search for UNSEEN messages in ranges. Add gen_recv_split() to split long protocol messages when the message prefix matches Order of search commands: IMAP> A010 SEARCH UNSEEN UNDELETED (IMAP4 or higher) IMAP> A011 SEARCH UNSEEN IMAP> A012 FETCH 1:n FLAGS --- fetchmail.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'fetchmail.h') diff --git a/fetchmail.h b/fetchmail.h index f6c6a4ec..fcab0e59 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -517,6 +517,13 @@ void resetidletimeout(void); int do_protocol(struct query *, const struct method *); /* transact.c: transaction support */ +struct RecvSplit +{ + char prefix[100]; + int cached; + char buf[MSGBUFSIZE]; +}; + void init_transact(const struct method *); int readheaders(int sock, long fetchlen, @@ -530,12 +537,16 @@ void gen_send(int sock, const char *, ... ) __attribute__ ((format (printf, 2, 3))) ; int gen_recv(int sock, char *buf, int size); +void gen_recv_split_init(const char *prefix, struct RecvSplit *rs); +int gen_recv_split(int sock, char *buf, int size, struct RecvSplit *rs); int gen_transact(int sock, const char *, ... ) __attribute__ ((format (printf, 2, 3))) ; #else void gen_send(); int gen_recv(); +void gen_recv_split_init(); +int gen_recv_split(); int gen_transact(); #endif extern struct msgblk msgblk; -- cgit v1.2.3