summaryrefslogtreecommitdiff
path: root/network_io
Commit message (Collapse)AuthorAgeFilesLines
* Make functions static (backport r991753).fuankg2011-03-101-2/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x@1080106 13f79535-47bb-0310-9956-ffa450edef68
* Backport r660405 from the trunk.bojan2008-05-271-1/+1
| | | | | | | Fix PR44971. Return APR_ENOENT if we cannot find service, errno is undefined. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x@660713 13f79535-47bb-0310-9956-ffa450edef68
* Quiet a warning on OS X about cur.len being used without initialization.fielding2007-09-071-3/+1
| | | | | | | | | This may fix a bug in IPv6 handling, depending on whether or not the compiler zeroes non-static structure members by default. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x@573481 13f79535-47bb-0310-9956-ffa450edef68
* Revert r442526, r443265:rpluem2007-08-131-20/+12
| | | | | | | | | | | | | | 1. Comment taken from r473681 (http://svn.apache.org/viewvc?view=rev&revision=473681): Making a new API guarantee (to have apr_socket_accept not allocate from the pool on error) can only be done in a minor version bump. 2. It breaks remote_addr handling (e.g. in httpd). git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x@565517 13f79535-47bb-0310-9956-ffa450edef68
* SetHandleInformation is not supported on WinCE, but the Win 9x code path wrowe2007-05-311-2/+2
| | | | | | | | | | | | works fine if enabled (testsockets passes). Modifes the #if's so the Win9x code path is also used for WinCE. PR: 39859 Submitted by: Curt Arnold <carnold apache.org> Backport: 543286 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x@543288 13f79535-47bb-0310-9956-ffa450edef68
* Sync OS2 unknown local_port flags to unix src.wrowe2006-11-281-0/+4
| | | | | | | Reviewed by wrowe and jorton Partial backport of 480212 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x@480216 13f79535-47bb-0310-9956-ffa450edef68
* Update license header.jorton2006-09-2013-78/+78
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x@448246 13f79535-47bb-0310-9956-ffa450edef68
* Backport r443262 from trunk.mturk2006-09-141-0/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x@443264 13f79535-47bb-0310-9956-ffa450edef68
* Backport r442135 from trunk.mturk2006-09-121-12/+19
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x@442526 13f79535-47bb-0310-9956-ffa450edef68
* Zero the len out value on error, to follow the unix behavior ofwrowe2006-02-041-0/+1
| | | | | | | | | | apr_socket_send() Submitted by: Chris Demetriou <c.g.demetriou gmail.com> Backports: 374924 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x@374926 13f79535-47bb-0310-9956-ffa450edef68
* The OS/2 send() function returns EINVAL if the data size is > 64k so limit thebjh2006-01-051-0/+4
| | | | | | | | | | | | | send size to 64k. As any call to apr_socket_send() must handle partial sends anyway, this will be treated just like any other partial send. This was occurring when svnserve was sending a large file. Backport from trunk of r366063. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x@366065 13f79535-47bb-0310-9956-ffa450edef68
* Fix a warning when building on FreeBSD due to an error in the argumentsrooneg2005-11-231-1/+1
| | | | | | | | | | | | | | | | passed to sysctlbyname. The fifth argument is a size_t, not a pointer, so using NULL is incorrect. This change is being committed directly to the 0.9.x branch because the version of this code in trunk no longer uses sysctlbyname. * network_io/unix/sendrecv.c (include_hdrs_in_length): Correct 5 argument to sysctlbyname. * CHANGES: Note change. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x@348360 13f79535-47bb-0310-9956-ffa450edef68
* merge from trunk:trawick2005-10-131-0/+1
| | | | | | | | | getnameinfo() may copy the port field around, so initialize it to something to prevent unitialized memory reference warnings with Purify git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x@320734 13f79535-47bb-0310-9956-ffa450edef68
* Support APR_SO_SNDBUF and APR_SO_RCVBUF on Windows.trawick2005-06-141-0/+12
| | | | | | | | PR: 32177 Submitted by: Sim <sgobbi datamanagement.it>, Jeff Trawick git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x@190577 13f79535-47bb-0310-9956-ffa450edef68
* send and receive buffer sizes are not flags, and callertrawick2005-06-141-10/+4
| | | | | | | | | | | | | | | may pass different values on different calls; so don't try to optimize this setsockopt() SO_LINGER is an odd one; the real setsockopt provides a configurable value for the timeout; but with APR, this is a flag and the timeout is hardcoded; so the optimization stays for this one Reviewed by: Joe Orton git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x@190574 13f79535-47bb-0310-9956-ffa450edef68
* Backport r178340 from trunk:wsanchez2005-05-281-8/+8
| | | | | | | | | | | | | | | | network_io/unix/sendrecv.c: Deal with EAGAIN after poll(). Following apr_wait_for_io_or_timeout(), we were doing I/O and not dealing with EAGAIN. It is legal for poll() to indicate that a socket is available for writing and then for write() to fail with EAGAIN if the state of the socket changed in between the poll() and write() calls. This only seems to actually happen on Mac OS 10.4 (Darwin 8). Rather than trying write() only once, if we get an EAGAIN, continue to call apr_wait_for_io_or_timeout() and try writing. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x@178842 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright year to 2005 and standardize on current copyright owner line.jerenkrantz2005-02-0413-13/+26
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x@151409 13f79535-47bb-0310-9956-ffa450edef68
* Remove .cvsignore files.APR_0_9_BRANCHjorton2004-11-203-12/+0
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/APR_0_9_BRANCH@105962 13f79535-47bb-0310-9956-ffa450edef68
* Since this code only applies to sendfile, make sure that it is properly ↵bnicholes2004-07-261-0/+2
| | | | | | #ifdef'ed git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/APR_0_9_BRANCH@65290 13f79535-47bb-0310-9956-ffa450edef68
* Win32: Fix bug in apr_socket_sendfile that interferred with LSPs. PR: 23982stoddard2004-07-212-31/+22
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/APR_0_9_BRANCH@65287 13f79535-47bb-0310-9956-ffa450edef68
* Backport from HEAD:jorton2004-07-131-0/+3
| | | | | | | | | | | * network_io/unix/sockaddr.c (apr_getnameinfo): Fix getnameinfo on v4mapped addresses for *BSD. PR: 30066 Submitted by: Tsurutani Naoki <turutani scphys.kyoto-u.ac.jp> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/APR_0_9_BRANCH@65279 13f79535-47bb-0310-9956-ffa450edef68
* backport this from 1.0-dev:trawick2004-05-241-5/+4
| | | | | | | | | | | | * network_io/unix/sockaddr.c (apr_getnameinfo): Use apr_uint32_t to fix build on platforms without uint32_t; use struct sockaddr_in rather than struct apr_sockaddr_t. Submitted by: Joe Orton Reviewed by: Jeff Trawick git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/APR_0_9_BRANCH@65123 13f79535-47bb-0310-9956-ffa450edef68
* backport this from 1.0-devtrawick2004-05-211-4/+3
| | | | | | | | | | Don't assume getnameinfo() can handle IPv4-mapped IPv6 addresses on any platforms. Submitted by: Jeff Trawick, Joe Orton, Colm MacC�rthaigh <colm stdlib.net> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/APR_0_9_BRANCH@65106 13f79535-47bb-0310-9956-ffa450edef68
* Backport from HEAD:jorton2004-04-151-0/+7
| | | | | | | | * network_io/unix/sockets.c (apr_socket_accept): Move TPF check for accept returning zero out of httpd. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/APR_0_9_BRANCH@65060 13f79535-47bb-0310-9956-ffa450edef68
* Adjust for different prototype for apr_set_option between 0.9 and HEAD.jerenkrantz2004-04-041-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/APR_0_9_BRANCH@65036 13f79535-47bb-0310-9956-ffa450edef68
* APR 1.0 Backport: network/unix/sockopt.c r1.79, network/win32/sockopt.c r1.59jerenkrantz2004-04-032-2/+4
| | | | | | | | | | | | | Even if we do not check the value of APR_IPV6_V6ONLY before setting, we still must set the option cache if we're setting APR_IPV6_V6ONLY. Otherwise, later apr_socket_opt_get calls will fail. This fixes Listen directives on IPv6 machines where IPV6_V6ONLY may be enabled (i.e. FreeBSD 5.x, OpenBSD, NetBSD) where it would not properly bind to the IPv4 socket. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/APR_0_9_BRANCH@65035 13f79535-47bb-0310-9956-ffa450edef68
* Backport from HEAD:jorton2004-03-061-1/+11
| | | | | | | | * network_io/sockets/sockaddr.c (call_resolver): Ignore anything other than AF_INET and AF_INET6 addresses. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/APR_0_9_BRANCH@64940 13f79535-47bb-0310-9956-ffa450edef68
* fix typo in previous committrawick2004-02-271-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/APR_0_9_BRANCH@64926 13f79535-47bb-0310-9956-ffa450edef68
* fix typo in previous committrawick2004-02-271-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/APR_0_9_BRANCH@64925 13f79535-47bb-0310-9956-ffa450edef68
* fix some compile and/or run-time bogosity on Unix-ish platformstrawick2004-02-271-6/+4
| | | | | | | | | | | | | with no O_NDELAY or FNDELAY flags this has been here since apr time zero when it was mis-copied from Apache httpd 1.3's buff.c, so perhaps this doesn't actually make anyone's life easer Discovered by: Joe Orton git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/APR_0_9_BRANCH@64924 13f79535-47bb-0310-9956-ffa450edef68
* Relicense APR under Apache License, Version 2.0.jerenkrantz2004-02-1313-637/+130
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/APR_0_9_BRANCH@64903 13f79535-47bb-0310-9956-ffa450edef68
* apr_socket_connect(): allow app to make subsequent call ontrawick2003-12-161-1/+1
| | | | | | | | non-blocking socket. (and find it is connected, not get unexpected EISCONN retval) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/APR_0_9_BRANCH@64841 13f79535-47bb-0310-9956-ffa450edef68
* Introduce apr_socket_atmark() with a more friendly failure case when thewrowe2003-10-163-0/+49
| | | | | | | | SIOCATMARK symbol isn't available, to avoid breaking APR 0.9/httpd 2.0 distributions. [William Rowe, Jim Jagielski, Brian Havard and Jeff Trawick] git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/APR_0_9_BRANCH@64691 13f79535-47bb-0310-9956-ffa450edef68
* Revert rev1.38 on 0.9 branch pending further testing on HEAD;jorton2003-09-291-15/+0
| | | | | | | | | | | | | rev1.38 was: Use AI_ADDRCONFIG flag by default, where available. * sockaddr.c (call_resolver): For lookups of AF_UNSPEC addresses, set the AI_ADDRCONFIG flag; retry without the flag if getaddrinfo returns EAI_BADFLAGS. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/APR_0_9_BRANCH@64667 13f79535-47bb-0310-9956-ffa450edef68
* work around a problem in current AIX getaddrinfo()trawick2003-09-091-0/+10
| | | | | | | | it wasn't needed in previous releases of APR or Apache because we didn't call the resolver when hostname was NULL git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/APR_0_9_BRANCH@64615 13f79535-47bb-0310-9956-ffa450edef68
* Attempt to put this Darwin getnameinfo() sillyness behind us forever. Ifjerenkrantz2003-08-311-0/+19
| | | | | | | | | | | | | | | | future releases of Darwin get it 'right', then we'll detect that. Take Jeff's gni_mapped and rewrite it as an autoconf macro, so we can do configure-time detection of this brokenness and stop hardcoding Darwin's inability to do the drop down. Then, take Colm's patch and make it conditional on the autoconf macro above. Submitted by: Colm MacCarthaigh <colm@stdlib.net> and Jeff Trawick Reviewed by: Justin Erenkrantz git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64599 13f79535-47bb-0310-9956-ffa450edef68
* Set the hostnames on all apr_sockaddr_t's returned.jerenkrantz2003-08-151-0/+2
| | | | | | | | Since we're at the same lifetime as the prev_sa, it's safe to just point to that one as well. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64590 13f79535-47bb-0310-9956-ffa450edef68
* If we don't have IPv6 enabled within APR (even if the OS supports it), wejerenkrantz2003-08-141-1/+11
| | | | | | | | | | | | | need to fail over to APR_INET rather than passing APR_UNSPEC. (Justin tweaked the patch so this code would always execute and add a description why we need this because it's not exactly obvious.) Submitted by: Colm MacCarthaigh <colm@stdlib.net> Reviewed by: Justin Erenkrantz git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64589 13f79535-47bb-0310-9956-ffa450edef68
* Make the getaddrinfo (IPv6) and gethostbyname (IPv4) implementationsjerenkrantz2003-08-141-2/+7
| | | | | | | | consistent in storing NULL values in the hostname if that is what was passed in by the caller. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64588 13f79535-47bb-0310-9956-ffa450edef68
* Modify apr_sockaddr_info_get to call the resolver when we do not have ajerenkrantz2003-08-131-17/+20
| | | | | | | | | | | | | | hostname. Also, fix bugs in the getaddrinfo() implementation which are present when a hostname is not available. (Justin modified Colm's patch to set servname when we do not have a hostname. RFC 2553 requires one of them to be non-NULL, and Solaris enforces that.) Submitted by: Colm MacC�rthaigh <colm@stdlib.net> Reviewed by: Justin Erenkrantz git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64587 13f79535-47bb-0310-9956-ffa450edef68
* leave a comment about an interesting and possibly unexpectedtrawick2003-08-011-0/+8
| | | | | | | behavior git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64576 13f79535-47bb-0310-9956-ffa450edef68
* Use AI_ADDRCONFIG flag by default, where available.jorton2003-07-171-0/+15
| | | | | | | | | * sockaddr.c (call_resolver): For lookups of AF_UNSPEC addresses, set the AI_ADDRCONFIG flag; retry without the flag if getaddrinfo returns EAI_BADFLAGS. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64571 13f79535-47bb-0310-9956-ffa450edef68
* apr_socket_data_set(): allow the same key to be used fortrawick2003-07-083-11/+83
| | | | | | | multiple sockets in the same pool. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64565 13f79535-47bb-0310-9956-ffa450edef68
* Fix some problems with non-blocking socket handling on unixtrawick2003-05-303-21/+24
| | | | | | | | that resulted in infinite timeouts being used for non-blocking sockets with apr_socket_connect() and some read/write calls. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64522 13f79535-47bb-0310-9956-ffa450edef68
* fix some minor style problems (indention, curly braces)trawick2003-05-301-40/+40
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64521 13f79535-47bb-0310-9956-ffa450edef68
* Fix a bug in socket timeout handling on unix that left thetrawick2003-05-301-0/+2
| | | | | | | | | | socket non-blocking after disabling the timeout. Submitted by: Jacob Craig Lewallen <jlewalle@cs.ucr.edu> Reviewed by: Jeff Trawick git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64520 13f79535-47bb-0310-9956-ffa450edef68
* Implement APR_SO_RCVBUF socket option on Unix.trawick2003-04-041-0/+12
| | | | | | | | Submitted by: Adam Sussman <myddryn@vishnu.vidya.com> Reviewed by: Jeff Trawick git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64472 13f79535-47bb-0310-9956-ffa450edef68
* Make consistent with other platforms by not exporting apr_sendfilefielding2003-04-011-24/+7
| | | | | | | | | if no APR_HAS_SENDFILE. If it should be exported, then someone will have to remove the conditionals from the global include file and add stubs to the other platforms for apr_sendfile and apr_socket_sendfile. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64466 13f79535-47bb-0310-9956-ffa450edef68
* Keep screaming about these bogus assumptions until they disappear.wrowe2003-03-191-0/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64433 13f79535-47bb-0310-9956-ffa450edef68
* Namespace protection, thanks to Craig Rodrigues <rodrigc@attbi.com>wrowe2003-02-243-3/+3
| | | | | | | | for the original patch. Use the new symbols in all internals, taking us one step closer to being ready to just chop out the old defines. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64378 13f79535-47bb-0310-9956-ffa450edef68