[Cyrus-CVS] src/cyrus/imap by brong

brong at andrew.cmu.edu brong at andrew.cmu.edu
Fri Aug 28 09:48:46 EDT 2009


Update of /afs/andrew.cmu.edu/system/cvs/src/cyrus/imap
In directory cyrus-devel-01.andrew.cmu.edu:/afs/andrew.cmu.edu/usr3/brong/src/cyrus/imap

Modified Files:
	index.c index.h mailbox.c mailbox.h make_md5.c make_sha1.c 
	mbexamine.c sync_server.c unexpunge.c 
Log Message:
Rewrite mailbox_cache_size to populate a pointer structure

The code is littered with CACHE_ITEM_NEXT calls.  Very annoyingly,
these can wind up jumping to random addresses outside the mmaped
space, and there's no way of knowing if they're valid or not.

This patch changes this apart from some sync code, by creating
a struct cacheitem and a datastructure of 10 of those: cacherecord.

You call cache_parserecord (or the mailbox_* functions that do
the same for a specific msgno/offset) to get the cache items into
the data structure, then use them by enum name.

Also - cache_parserecord returns the length of the entire cache


--- links to diffs follow ---
http://bugzilla.andrew.cmu.edu/cgi-bin/cvsweb.cgi/src/cyrus/imap/index.c.diff?r1=1.252&r2=1.253
http://bugzilla.andrew.cmu.edu/cgi-bin/cvsweb.cgi/src/cyrus/imap/index.h.diff?r1=1.16&r2=1.17
http://bugzilla.andrew.cmu.edu/cgi-bin/cvsweb.cgi/src/cyrus/imap/mailbox.c.diff?r1=1.194&r2=1.195
http://bugzilla.andrew.cmu.edu/cgi-bin/cvsweb.cgi/src/cyrus/imap/mailbox.h.diff?r1=1.94&r2=1.95
http://bugzilla.andrew.cmu.edu/cgi-bin/cvsweb.cgi/src/cyrus/imap/make_md5.c.diff?r1=1.9&r2=1.10
http://bugzilla.andrew.cmu.edu/cgi-bin/cvsweb.cgi/src/cyrus/imap/make_sha1.c.diff?r1=1.5&r2=1.6
http://bugzilla.andrew.cmu.edu/cgi-bin/cvsweb.cgi/src/cyrus/imap/mbexamine.c.diff?r1=1.20&r2=1.21
http://bugzilla.andrew.cmu.edu/cgi-bin/cvsweb.cgi/src/cyrus/imap/sync_server.c.diff?r1=1.31&r2=1.32
http://bugzilla.andrew.cmu.edu/cgi-bin/cvsweb.cgi/src/cyrus/imap/unexpunge.c.diff?r1=1.12&r2=1.13


More information about the Cyrus-cvs mailing list