Commit Graph

21 Commits

Author SHA1 Message Date
95fb75425d merged some changes from the 1-0 branch that apparently never got merged into HEAD
svn path=/trunk/; revision=15019
2001-12-13 20:32:42 +00:00
c0cf9754b8 Make sure we've actually read data before checking if p[-] is '\r' or not.
2001-10-28  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-stream-buffer.c (camel_stream_buffer_read_line): Make sure
	we've actually read data before checking if p[-] is '\r' or not.

svn path=/trunk/; revision=14288
2001-10-28 09:37:36 +00:00
2c2cdb4ee5 Same.
2001-10-28  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-tcp-stream-raw.c (stream_write): Same.

	* camel-stream-fs.c (stream_write): If errno isn't EAGAIN, just
	exit with -1 and instead of using continue (which doesn't go to
	the top of the do-while thus making our logic suck), just set w to
	0. Still seems to be a bug in select() if it's telling us the
	socket is ready for data when it really isn't but oh well.

svn path=/trunk/; revision=14286
2001-10-28 07:03:32 +00:00
42606efd98 More fixing of the license texts.
svn path=/trunk/; revision=14216
2001-10-27 18:06:04 +00:00
d09dd29be0 Check for EWOULDBLOCK too? (stream_read): Same. (stream_flush): Return 0
2001-10-26  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-tcp-stream-raw.c (stream_write): Check for EWOULDBLOCK
	too?
	(stream_read): Same.
	(stream_flush): Return 0 always, fsync() and tcp sockets don't
	play nice :-)

	* providers/imap/camel-imap-message-cache.c
	(camel_imap_message_cache_get): Lets try putting a
	camel_stream_reset() here. Logic being that the stream may have
	been read from since it was cached and thus our caller may try
	reading from it and get no data from it since it is already at the
	EOS. This may fix bug #12943.

svn path=/trunk/; revision=14180
2001-10-26 22:54:02 +00:00
7ef153696b Check for EWOULDBLOCK too? (stream_read): Same.
2001-10-26  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-tcp-stream-raw.c (stream_write): Check for EWOULDBLOCK too?
	(stream_read): Same.

	* providers/imap/camel-imap-message-cache.c
	(camel_imap_message_cache_get): Lets try putting a
	camel_stream_reset() here. Logic being that the stream may have
	been read from since it was cached and thus our caller may try
	reading from it and get no data from it since it is already at the
	EOS. This may fix bug #12943.

svn path=/trunk/; revision=14179
2001-10-26 22:52:15 +00:00
1569d31133 updated the SIMULATE_FLAKY_NETWORK code
svn path=/trunk/; revision=13995
2001-10-24 22:15:47 +00:00
66c5805817 Same as in the TcpStreamRaw code. (stream_write): And again here...
2001-10-24  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-stream-fs.c (stream_read): Same as in the TcpStreamRaw code.
	(stream_write): And again here...

	* camel-tcp-stream-raw.c (stream_read): Handle the EAGAIN error
	case as well.
	(stream_write): Same here, this might fix the SMTP truncation
	thing? I hope?

svn path=/trunk/; revision=13993
2001-10-24 21:09:35 +00:00
846fe128cb As below.
2001-10-17  Not Zed  <NotZed@Ximian.com>

        * camel-tcp-stream-raw.c (stream_write): As below.

        * camel-stream-fs.c (stream_write): If not checking cancellation,
        make sure we write out everything asked of us.

svn path=/trunk/; revision=13717
2001-10-17 04:09:17 +00:00
f1e3395ff2 Likewise.
2001-09-08  Not Zed  <NotZed@Ximian.com>

        * providers/local/camel-spool-summary.c (spool_summary_sync_full): Likewise.

        * providers/local/camel-mbox-summary.c (mbox_summary_sync_full): Fix the wording.

        * camel-tcp-stream-raw.c (stream_read): Save errno around fcntl
        call in cancellable read case.  Also, loop while we get EINTR.
        This might fix some weird reconnect behaviour with pop.
        (stream_write): "

svn path=/trunk/; revision=12700
2001-09-08 00:45:24 +00:00
0a99920bfe s/IMAPv4/IMAP
2001-08-27  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/imap/camel-imap-provider.c: s/IMAPv4/IMAP

svn path=/trunk/; revision=12485
2001-08-27 18:28:06 +00:00
fe962a2055 Big header cleanups and nntp compile fix
svn path=/trunk/; revision=9024
2001-03-29 20:31:40 +00:00
a9df5de4af Print info about the issuer of the certificate.
2001-03-16  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-tcp-stream-ssl.c (ssl_bad_cert): Print info about the
	issuer of the certificate.

	* providers/smtp/camel-smtp-transport.c (smtp_connect): Use
	camel_tcp_stream_get_socket().

	* camel-tcp-stream-openssl.c (stream_get_socket): Implemented.

	* camel-tcp-stream-ssl.c (stream_get_socket): Implemented.

	* camel-tcp-stream-raw.c (stream_get_socket): Implemented.

	* camel-tcp-stream.c (camel_tcp_stream_get_socket): New function.

svn path=/trunk/; revision=8764
2001-03-16 23:02:04 +00:00
83b4aa2b1d Check for a new type of mailing list header.
2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-utils.c: Check for a new type of mailing list header.

svn path=/trunk/; revision=8702
2001-03-14 06:16:28 +00:00
24bb645439 Made cancellable. (stream_write): Same. (stream_connect): Removed checks
2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-tcp-stream-raw.c (stream_read): Made cancellable.
	(stream_write): Same.
	(stream_connect): Removed checks for DIVINE_INTERVENTION as the
	code worked fine.

	* camel-tcp-stream-ssl.c (stream_write): get rid of 'w' as it
	wasn't really needed.
	(set_errno): New function to set errno based on the NSPR error
	code.
	(stream_read): If an error occured, call set_errno().
	(stream_write): Same.

svn path=/trunk/; revision=8701
2001-03-14 04:31:58 +00:00
e258958d9e Oops. Make this a subclass of CamelTcpStream, not CamelStream.
2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_get_type):
	Oops. Make this a subclass of CamelTcpStream, not CamelStream.

	* camel-types.h: Add the defs for CamelTcpStream and
	CamelTcpStreamRaw

	* Makefile.am: Add camel-tcp-stream and camel-tcp-stream-raw to
	the build.

	* camel-remote-store.c (remote_connect): Update to use
	CamelTcpStreams.

	* camel-tcp-stream-raw.c (stream_connect): Made cancellable by
	copying the currently used code in camel-remote-store.c.
	(stream_setsockopt): Oops, flags = fcntl (..., GET_FL);
	(camel_tcp_stream_raw_get_type): Oops. Make this a subclass of
	CamelTcpStream, not CamelStream.

svn path=/trunk/; revision=8697
2001-03-14 00:46:59 +00:00
3f72f52320 fcntl(fd, F_GETFL) returns the flags as the return value, not via a passed
* camel-tcp-stream-raw.c (stream_getsockopt, stream_setsockopt):
	* camel-stream-fs.c (stream_read, stream_write):
	* camel-remote-store.c (socket_connect): fcntl(fd, F_GETFL)
	returns the flags as the return value, not via a passed in
	pointer. And F_SETFL looks for an int, not a long, and you have to
	pass it what it's expecting because it's a va_arg parameter. (Yes,
	the man page lies on Linux. But check the UNIX98 spec or the glibc
	source.) Also, fix another bug in socket_connect: if we manage to
	connect right away, unset O_NONBLOCK so it doesn't mess us up
	later.

	Fixes a bunch of problems with non-blocking I/O being done in the
	allegedly-blocking case and then returning EWOULDBLOCK.

svn path=/trunk/; revision=7555
2001-01-16 23:27:51 +00:00
d9b76e981f If the close() is successful, set the fd to -1.
2001-01-15  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-stream-fs.c (stream_close): If the close() is successful,
	set the fd to -1.

	* camel-tcp-stream-raw.c: Removed the disconnect() method.
	(stream_close): If the close() is successful, set the sockfd to
	-1.

	* camel-tcp-stream-ssl.c: Removed the disconnect() method.
	(stream_close): If the close() is successful, set the sockfd to
	NULL.

	* camel-tcp-stream.c (camel_tcp_stream_disconnect): Removed,
	easier to just use the close() method as it did the same thing
	anyway.

svn path=/trunk/; revision=7522
2001-01-16 00:54:18 +00:00
ffe3a796ed Updated to be able to get the CAMEL_SOCKOPT_NONBLOCKING socket opt.
2001-01-15  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-tcp-stream-raw.c (stream_getsockopt): Updated to be able
	to get the CAMEL_SOCKOPT_NONBLOCKING socket opt.
	(stream_setsockopt): Updated to be able to set the
	CAMEL_SOCKOPT_NONBLOCKING socket opt.

svn path=/trunk/; revision=7519
2001-01-15 23:31:40 +00:00
24a2d4baa8 Implemented. (stream_setsockopt): Implemented.
2001-01-14  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-tcp-stream-ssl.c (stream_getsockopt): Implemented.
	(stream_setsockopt): Implemented.

	* camel-tcp-stream-raw.c (stream_getsockopt): Implemented.
	(stream_setsockopt): Implemented.

	* camel-tcp-stream.c (camel_tcp_stream_getsockopt): New method.
	(camel_tcp_stream_setsockopt): Another new method. I think you get
	the idea of what these are for so I won't explain them.

svn path=/trunk/; revision=7491
2001-01-14 22:48:09 +00:00
5608af39dd New CamelTcpStream class that implements nspr sockets and eventually will
2001-01-14  Jeffrey Stedfast  <fejj@helixcode.com>

	* camel-tcp-stream-ssl.[c,h]: New CamelTcpStream class that
	implements nspr sockets and eventually will use nss for
	SSL/TLS. Currently doesn't do any SSL/TLS but it should still
	work. It's functionally equivalent to CamelTcpStreamRaw at the
	moment only it uses nspr i/o.

	* camel-tcp-stream-raw.[c,h]: New CamelTcpStream class that
	implements native sockets. Should be usable but may have some bugs
	yet.

svn path=/trunk/; revision=7489
2001-01-14 08:21:00 +00:00