1. 14 Oct, 2001 2 commits
    • 	It should probably be a runtime option via set debug=1 or something
      	for now it is disable between if (0) {...}.
      
      	More cleanup in the IMAP code.  A memory stream buffer is
      	use to save the string literal sended by the IMAP server.
      	The allocation is handle by the memory_stream which simplifies
      	the code.
      
      	* folder_imap.c (folder_imap.c): Create a memory stream to
      	hold the literal or quoted string send by the IMAP server.
      	(folder_imap_list folder_imap_lsub): There is no callback
      	field the struct folder_list is in struct _f_imap now.
      	(imap_literal_string imap_quoted_string imap_string):  Use the
      	memory string stream to save the result.
      	(imap_body): Still need to be clean, but creates the cache
      	header when doing the scan.
      	(imap_parse): Do not use alloca().
      Alain Magloire authored
  2. 13 Oct, 2001 2 commits
  3. 12 Oct, 2001 3 commits
  4. 11 Oct, 2001 3 commits
    • 	(imap_string): Free the buffer.
      	(imap_body): Check if we already have the fheader header.
      	(imap_scan): Forgot the break in the switch.
      
      I think, I broke something in the IMAP code too .. sigh ... it
      is getting to late here to figure this out.
      Alain Magloire authored
    • 	the approach of downloading part of the header of the total
      	set of messages.  The it was done before is that the headers
      	were ask one by one per message.  This was causing performance
      	delay because we were doing a lot of small transaction on
      	the TCP/IP stack.  By bundling the entire thing in one request
      	there was much less transcation and the speed was increase
      	by a factor of 10++.
      	The Imap code folder_imap.c and mbx_imap.c is now messy.
      	The rewrite in mailbox2 should clean this up though.
      
      	* mailbox/folder_imap.c (imap_quoted_string): Allocated the
      	memory instead.
      	(imap_body): If we were doing the scan free the memory and create
      	the cache header.
      	(imap_fetch): Create the message if was not done, important for
      	the scan.
      	* mailbox/mbx_imap.c (imap_scan): Bundle one big request to
      	fetch as much information as possible.
      	(message_operation): Free the buffer when done.
      	* mailbox/include/imap0.h: Add IMAP_SCAN states.
      
      	* mailbox/file_stream.c (_file_readline): It seems that fgets() can
      	not handle binary data.  Try to do our best.
      Alain Magloire authored
    • 	of byte written to 0.
      	(header_get_value): Likewised.
      	* mailbox/mbx_imap.c (imap_envelope_sender): Go through
      	header_get_value() to fetch the "Sender" field, it may be cache.
      	(imap_header_get_fvalue): Put parenthesies around the FETCH, the
      	WU-IMAPD likes it that way.
      Alain Magloire authored
  5. 10 Oct, 2001 2 commits
  6. 09 Oct, 2001 2 commits
  7. 08 Oct, 2001 4 commits
  8. 06 Oct, 2001 2 commits
  9. 05 Oct, 2001 4 commits
  10. 04 Oct, 2001 2 commits
  11. 03 Oct, 2001 2 commits
  12. 02 Oct, 2001 2 commits
    • Alain Magloire authored
    • 	* mailbox2/include/mailutils/sys/mbox.h: New prototypes.
      	* mailbox2/mbox/*.c: Finish implementation.
      	* mailbox2/attribute.c: Add user flags.
      	* mailbox2/dattribute.c: Add user flags.
      
      	To be compatible with the old mailbox, all stream read
      	and write take an offset. Removed stream_seek () and add
      	stream_is_seekable() instead.
      	* mailbox2/stream.c: Likewised.
      	* mailbox2/bstream.c: Likewised.
      	* mailbox2/fdstream.c: Likewised.
      	* mailbox2/fstream.c: Likewised.
      	* mailbox2/mapstream.c: Likewised.
      	* mailbox2/memstream.c: Likewised.
      	* mailbox2/tcpstream.c: Likewised.
      
      	* mailbox2/include/mailutils/error.h: Add EBADFD.
      Alain Magloire authored
  13. 27 Sep, 2001 1 commit
  14. 26 Sep, 2001 1 commit
  15. 24 Sep, 2001 1 commit
  16. 23 Sep, 2001 2 commits
    • Alain Magloire authored
    • 	the base functions/methods visible so the extended object
      	could reuse some base methods if necessary.  Inheritance
      	is possible because we always add to the end of the vtable
      	structure new functions.
      	For example, mime_t object will be also a message_t.
      	and it will be possible to do
      	{
      	  mime_t mime;
      	  header_t header;
      	  ...
      	  message_get_header ((message_t)mime, header);
      	}
      	Another example is tcpstream(socket stream) extends
      	fdstream(file description stream);
      	Also the name of the functions have change to match better
      	there purpose.
      
      	* mailbox2/Makefile.am: lockfile.c added.
      	* mailbox2/bstream.c: Reoganisation to make the
      	functions visible.
      	* mailbox2/dattribute.c: Likewise.
      	* mailbox2/dotlock.c: Likewise.
      	* mailbox2/fdstream.c: Likewise.
      	* mailbox2/fstream.c: Likewise.
      	* mailbox2/mapstream.c: Likewise.
      	* mailbox2/memstream.c: Likewise.
      	* mailbox2/pticket.c: Likewise.
      	* mailbox2/sdebug.c: Likewise.
      	* mailbox2/tcpstream.c: Likewise.
      
      	* mailbox2/include/mailutils/Makefile.am: lockfile.h added.
      	* mailbox2/include/mailutils/attribute.h: Add the new prototypes.
      	* mailbox2/include/mailutils/mbox.h: Add the new prototypes.
      	* mailbox2/include/mailutils/stream.h: Add the new prototypes.
      
      	* mailbox2/include/mailutils/sys/Makefile.am: dattribute.h lockfile.h
      	mapstream.h pticket.h added.
      	* mailbox2/include/mailutils/sys/bstream.h: Add new prototypes.
      	* mailbox2/include/mailutils/sys/fdstream.h: Likewise.
      	* mailbox2/include/mailutils/sys/fstream.h: Likewise.
      	* mailbox2/include/mailutils/sys/mbox.h: Likewise.
      	* mailbox2/include/mailutils/sys/memstream.h: Likewise.
      	* mailbox2/include/mailutils/sys/sdebug.h: Likewise.
      	* mailbox2/include/mailutils/sys/tcpstream.h: Likewise.
      Alain Magloire authored
  17. 20 Sep, 2001 5 commits