aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-tcp-stream-raw.c
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of an unused variable.Jeffrey Stedfast2002-04-171-6/+6
| | | | | | | | | | | | | | | | | | | 2002-04-16 Jeffrey Stedfast <fejj@ximian.com> * camel-filter-driver.c (camel_filter_driver_filter_folder): Get rid of an unused variable. * providers/smtp/camel-smtp-transport.c (smtp_helo): Use camel_gethostbyaddr since gethostbyaddr is not reentrant. * camel-http-stream.c (http_connect): Updated after the rename of camel_get_host_byname. * camel-service.c (camel_gethostbyname): Renamed. (camel_gethostbyaddr): New cancellable/reentrant version of gethostbyaddr. svn path=/trunk/; revision=16484
* Remove this: it couldn't be generically used, because different subclassesDan Winship2002-03-111-6/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-tcp-stream.c (camel_tcp_stream_get_socket): Remove this: it couldn't be generically used, because different subclasses returned entirely different types of data. (camel_tcp_stream_get_local_address, camel_tcp_stream_get_remote_address): Add these to replace what get_socket was being used for. (camel_tcp_address_new, camel_tcp_address_free): Utility functions for get_{local,remote}_address. * providers/smtp/camel-smtp-transport.c: Change localaddr to a CamelTcpAddress *. (connect_to_server): Call camel_tcp_stream_get_local_address to get the local IP address. (smtp_disconnect): free localaddr. (smtp_helo): Update for localaddr change. * camel-tcp-stream-raw.c (stream_get_socket): Remove (stream_get_local_address, stream_get_remote_address): Implement. * camel-tcp-stream-ssl.c (stream_get_socket): Remove (stream_get_local_address, stream_get_remote_address): Implement. * camel-tcp-stream-openssl.c (stream_get_socket): Remove (stream_get_local_address, stream_get_remote_address): Implement. svn path=/trunk/; revision=16092
* merged some changes from the 1-0 branch that apparently never got merged ↵Jeffrey Stedfast2001-12-141-2/+2
| | | | | | into HEAD svn path=/trunk/; revision=15019
* Make sure we've actually read data before checking if p[-] is '\r' or not.Jeffrey Stedfast2001-10-281-6/+57
| | | | | | | | | 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
* Same.Jeffrey Stedfast2001-10-281-8/+8
| | | | | | | | | | | | | | 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
* More fixing of the license texts.Ettore Perazzoli2001-10-281-11/+11
| | | | svn path=/trunk/; revision=14216
* Check for EWOULDBLOCK too? (stream_read): Same. (stream_flush): Return 0Jeffrey Stedfast2001-10-271-1/+1
| | | | | | | | | | | | | | | | | | | 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
* Check for EWOULDBLOCK too? (stream_read): Same.Jeffrey Stedfast2001-10-271-5/+29
| | | | | | | | | | | | | | | | 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
* updated the SIMULATE_FLAKY_NETWORK codeJeffrey Stedfast2001-10-251-10/+12
| | | | svn path=/trunk/; revision=13995
* Same as in the TcpStreamRaw code. (stream_write): And again here...Jeffrey Stedfast2001-10-251-27/+61
| | | | | | | | | | | | | | 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
* As below.Not Zed2001-10-171-2/+7
| | | | | | | | | | | 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
* Likewise.Not Zed2001-09-081-4/+15
| | | | | | | | | | | | | | | 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
* s/IMAPv4/IMAPJeffrey Stedfast2001-08-281-1/+1
| | | | | | | | 2001-08-27 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-provider.c: s/IMAPv4/IMAP svn path=/trunk/; revision=12485
* Big header cleanups and nntp compile fixKjartan Maraas2001-03-301-3/+5
| | | | svn path=/trunk/; revision=9024
* Print info about the issuer of the certificate.Jeffrey Stedfast2001-03-171-0/+8
| | | | | | | | | | | | | | | | | | | | 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
* Check for a new type of mailing list header.Jeffrey Stedfast2001-03-141-0/+1
| | | | | | | | 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
* Made cancellable. (stream_write): Same. (stream_connect): Removed checksJeffrey Stedfast2001-03-141-33/+73
| | | | | | | | | | | | | | | | | | 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
* Oops. Make this a subclass of CamelTcpStream, not CamelStream.Jeffrey Stedfast2001-03-141-4/+105
| | | | | | | | | | | | | | | | | | | | | | | | 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
* fcntl(fd, F_GETFL) returns the flags as the return value, not via a passedDan Winship2001-01-171-4/+6
| | | | | | | | | | | | | | | | | | * 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
* If the close() is successful, set the fd to -1.Jeffrey Stedfast2001-01-161-11/+6
| | | | | | | | | | | | | | | | | | | | | 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
* Updated to be able to get the CAMEL_SOCKOPT_NONBLOCKING socket opt.Jeffrey Stedfast2001-01-161-0/+26
| | | | | | | | | | | 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
* Implemented. (stream_setsockopt): Implemented.Jeffrey Stedfast2001-01-151-0/+74
| | | | | | | | | | | | | | | | 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
* New CamelTcpStream class that implements nspr sockets and eventually willJeffrey Stedfast2001-01-141-0/+196
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