summaryrefslogtreecommitdiff
path: root/memcache/apr_memcache.c
Commit message (Collapse)AuthorAgeFilesLines
* Check sockets from connection pool before using them and try to reconnectRuediger Pluem2023-05-031-7/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | them if they are not usable any longer. * memcache/apr_memcache.c::ms_find_conn: Check if the socket returned from the connection pool is still readable. If not then invalidate the connection in the pool and request a new one from the connection pool. Repeat this until a valid socket is returned or this was done the maximum number of connections in the pool plus one. This ensures that at least one new socket was created. If a new socket does not work this indicates a broken backend and not just a restart in the past. In this case return an error like previously. * test/testmemcache.c: Add new test for connection validation. * test/memcachedmock.c: For the new test we need a memcached mock server that we control and can restart. * test/testmemcache.h: Shared defines between test/testmemcache.c and test/memcachedmock.c. * test/Makefile.in: * test/Makefile.win: * test/NWGNUmakefile: * test/NWGNUmemcachedmock: Needed changes to build test/memcachedmock.c on different platforms. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909585 13f79535-47bb-0310-9956-ffa450edef68
* In case that we have threads store the apr_reslist parameters in theRuediger Pluem2023-04-281-0/+5
| | | | | | | | | | | | | apr_memcache_server_t struct for later usage. * include/apr_memcache.h::struct apr_memcache_server_t: Add missing fields to struct. * memcache/apr_memcache.c::apr_memcache_server_create: Init fields with given values. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909474 13f79535-47bb-0310-9956-ffa450edef68
* * memcache/apr_memcache.c (conn_connect): Allow use of IPv6Joe Orton2023-02-031-4/+4
| | | | | | | | | | rather than forcing name resolution to IPv4 only. Submitted by: Lubos Uhliarik <luhliari redhat.com> Github: closes #39 git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907242 13f79535-47bb-0310-9956-ffa450edef68
* Remove trailing whitespaces in *.c.Ivan Zhakov2022-11-201-46/+46
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1905414 13f79535-47bb-0310-9956-ffa450edef68
* Save some cycles by not copying the pollfds.Christophe Jaillet2017-06-021-1/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1797422 13f79535-47bb-0310-9956-ffa450edef68
* apr_memcache: reserve buffer space for trailing \0.Yann Ylavic2017-02-071-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1782045 13f79535-47bb-0310-9956-ffa450edef68
* apr_memcache: Better validate the values' length provided by the memcached toYann Ylavic2015-10-311-67/+82
| | | | | | | | | | | terminate the connection appropriately in getp() and avoid an infinite loop in multigetp(). Reported/Proposed by: Jeffrey Crowell <jcrowell google.com> Adapted/Committed by: ylavic git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1711657 13f79535-47bb-0310-9956-ffa450edef68
* fix some minor bugs and useless assignments so that clang scan-buildJeff Trawick2013-10-231-3/+6
| | | | | | | is a little quieter git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1534882 13f79535-47bb-0310-9956-ffa450edef68
* fix crash introduced in r1484271Jeff Trawick2013-06-171-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1493715 13f79535-47bb-0310-9956-ffa450edef68
* Add support to apr_memcache for unix domain sockets.Graham Leggett2013-05-191-2/+12
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1484271 13f79535-47bb-0310-9956-ffa450edef68
* Revert r1390526; ttl is in microsecondsJeff Trawick2012-09-271-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1391193 13f79535-47bb-0310-9956-ffa450edef68
* apr_memcache_server_create(): Fix handling of the ttl parameter.Jeff Trawick2012-09-261-1/+1
| | | | | | | | | | | | | | It is documented as a number of seconds but was treated as microseconds. (The current Subversion release passes seconds.) PR: 51511 Submitted by: Tim Whittington <timw apache.org> Reviewed by: trawick git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1390526 13f79535-47bb-0310-9956-ffa450edef68
* Fix dead server retry logic.Jeff Trawick2012-09-261-1/+1
| | | | | | | | Submitted by: Gavin Shelley <columbusmonkey me.com> Reviewed by: trawick git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1390477 13f79535-47bb-0310-9956-ffa450edef68
* Fix possible segfault.Stefan Fritsch2011-10-151-2/+4
| | | | | | | | PR: 51064 Submitted by: Michajlo Matijkiw <michajlo_matijkiw comcast com> git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1183689 13f79535-47bb-0310-9956-ffa450edef68
* fix extra "the" in comments and license textJeff Trawick2011-03-231-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1084662 13f79535-47bb-0310-9956-ffa450edef68
* - start is never usedPhilip M. Gollucci2010-08-051-4/+0
| | | | | | | | Reported by: clang static analyzer git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@982735 13f79535-47bb-0310-9956-ffa450edef68
* - this is handling the error condition, not successPhilip M. Gollucci2010-08-041-1/+1
| | | | | | | | [note, testmemcache apparently doesn't hit this path] git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@982409 13f79535-47bb-0310-9956-ffa450edef68
* - Fix mismatched signed comparisons [1]Philip M. Gollucci2010-08-041-4/+4
| | | | | | | | | - While here replace atoi with strtol(3) Reported by: sf via gcc [1] git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@982408 13f79535-47bb-0310-9956-ffa450edef68
* Convert various APU_DECLARE into APR_DECLARE.Bojan Smojver2009-07-161-22/+22
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@794523 13f79535-47bb-0310-9956-ffa450edef68
* Merge APR-Util trunk into APR.Paul Querna2009-03-241-0/+1701
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@757704 13f79535-47bb-0310-9956-ffa450edef68