2005-01-23 23:36  sean

	* memcache.h, pmkfile: Stamp 1.2.3.  This release only includes
	  compile fixes for Leenox *cough*hoplessly broken platform*cough*
	  and is functionally identical to 1.2.1.

2005-01-23 23:22  sean

	* INSTALL: /libmemcache(3)/memcache(3)/

2005-01-23 23:21  sean

	* memcache.c: I think the warning message says it best:

	  #warning "Working around busted-ass Linux header include
	  problems: use FreeBSD instead" #warning "http://www.FreeBSD.org/
	  - you won't regret it"

2005-01-20 10:21  sean

	* memcache.h: Stamp 1.2.2 in memcache.h's version information.

2005-01-20 10:14  sean

	* pmkfile: Stamp 1.2.2.  There is no functional difference between
	  1.2.1 and 1.2.2, only building of the program has been "fixed" to
	  work with broken versions of pmk(1).

2005-01-20 10:13  sean

	* pmkfile: In the interim, work around a bug in pmk 0.9.0 and
	  reduce the size of my comment block by replacing my copyright
	  notice with a reference to COPYING.

2005-01-20 10:12  sean

	* COPYING: Add the license used for this software (MIT License).

2005-01-20 09:59  sean

	* pmkfile: s/CHECK_INCLUDE/CHECK_HEADER/g

	  http://sourceforge.net/mailarchive/message.php?msg_id=10609509

2005-01-20 01:03  sean

	* pmkfile: Stamp 1.2.1 which fixes a few key brain-o's in the
	  memory free(3)'ing dept.

2005-01-20 00:54  sean

	* memcache.c: Fucking Linux/GPL/gcc, why can't it just curl up and
	  die?	Change %zu and %hu to just %u.	This adds a warning that
	  *should* be reasonably harmless.

		  memcache.c:2192: warning: unsigned int format, size_t arg
	  (arg 4)

2005-01-20 00:33  sean

	* regress.c: Plug small memory leak in regression tests.

	  Pointed out by: John McCaskey

2005-01-20 00:23  sean

	* memcache.c, memcache.h: *) Add flag to note the need to free a
	  key when it's passed and strdup()'ed	  instead of passed by
	  reference (ie, mcm_req_add() vs mcm_req_add_ref()).

	  *) Use mcm_req_add_ref() in mcm_aget() and mcm_arefresh() instead
	     of mcm_req_add(): no sense in mcmStrdup()'ing a string that we
	  know isn't	going to change.  Unfortunately this introduces a
	  warning, but the code    is correct because GCC can't see the
	  logic and use of the flag in struct	 memcache_res's _flags
	  member.

2005-01-11 03:23  sean

	* memcache.h: Add a void *misc pointer to struct memcache_req and
	  struct memcache_res.

2005-01-11 03:16  sean

	* memcache.c, memcache.h: Move various buffer orriented struct
	  memcache members to struct memcache_server in preparation for
	  support of the non-blocking IO scatter/gather multi-get scheme
	  described on the memcached@ mailing list.  This transion deferrs
	  initialization of the buffer from creation of struct memcache, to
	  the creation of struct memcache_server *and* increases the memory
	  overhead to be: buffer size * number of servers.  The default
	  buffer is still 2KB.

2005-01-10 13:34  sean

	* crc32_table.h, memcache.c: For the longest time, this gnarly
	  crc32 prebuilt table has been a rather large eye sore.  Fix by
	  moving said table into it's own header file and include
	  accordingly.

	  With crc32 table (and it's hex values gone), continue my
	  aspell(1) sweep and tidy up some type-o's.  This is what I get
	  for either having brain-o's, or for typing with a largish bandage
	  on my index finger.  I'll be quite happy when I'm no longer
	  EDOGBYTE errors (pun intended).  *sigh*

2005-01-10 02:31  sean

	* memcache.c: Peremptev spel chek run,

2005-01-10 02:25  sean

	* memcache.h: Run aspell(1) over memcache.h.

	  Prompted by:	  Evan Martin's 's/strickly/strictly/' reminder.
	  :)

2005-01-09 15:40  sean

	* pmkfile: Release 1.2.0

2005-01-09 15:34  sean

	* Makefile.pmk, pmkfile: Update make release targets to use pmk(1)
	  detected paths for variables.  This shouldn't effect anyone byt
	  me since the various binaries aren't required for anything but
	  release engineering.

2005-01-09 14:58  sean

	* Makefile.pmk: Update release target to rm(1) target via sudo(1).

2005-01-09 01:08  sean

	* Makefile.pmk: Spell cvs2cl.pl as cvs2cl.  I should have pmk
	  detect this, but I'm too lazy to fix this now.

2005-01-09 01:03  sean

	* memcache.c, memcache.h: Don't hash to find the remote server when
	  there is only one live server.  This should shave a few CPU
	  cycles for folks who only have one server up.

	  Add a new function, mc[m]?_req_add_ref().  mc[m]?_req_add_ref()
	  behaves identically to the way mc[m]?_req_add() used to.
	  mc[m]?_req_add() now mc[m]?_strdup()'s the key to be safe.
	  mc[m]_req_add_ref() uses a reference instead of a copy.  This was
	  a performance/safety issue that I felt was best to err on the
	  safe side unless someone goes out of their way to understand the
	  dangers/benefits of the _ref() version.

2005-01-04 13:35  sean

	* Makefile.pmk, memcache.h, pmkfile, regress.c: Copyright bump: add
	  2005

2005-01-04 12:44  sean

	* regress.c: Use three servers again and make use of
	  mc_server_add4() to make this possible again.

2005-01-04 12:43  sean

	* memcache.c, memcache.h: Add mc[m]?_server_add4().  Takes a host
	  argument in the form of: "127.0.0.1:11211".  Should be useful for
	  a number of different applications, not the least of which is
	  config files.

	  Add mc[m]?_strndup().  Copies at most len bytes and adds a '\0'
	  padding character.  Handy.  Wish this was a part of the standard
	  C string lib.  mcm_strdup() is now implemented in terms of
	  mcm_strndup().

	  Change mc[m]?_str[n]?dup() to use the atomic malloc instead of
	  the normal malloc.  Just an optimization/correctness thing for
	  GC'ed environments.

	  It's starting to smell alot like release time...

2005-01-04 12:14  sean

	* memcache.h: Fix the callback interface (was only broken for a
	  revvision) and prevent future brokeness by changing the signature
	  to be defined in terms of the existing MD5 macros.  I should've
	  done that from moment one.

2005-01-04 12:12  sean

	* Makefile.pmk: Add .h as a build dependency for .c files.

	  Add memcache.[ch] as a build dependency for the regression tests.

2005-01-04 12:01  sean

	* memcache.h: Add a "void *misc" struct member to struct memcache.
	  Primary use is for embedding memcache(3) in other programming
	  languages.  Please note that memcache(3) will never touch this
	  pointer for any purpose.

	  As promised, change the md5's for the callback interface.

	  Reorder some of struct memcache and tweak wording.

2005-01-04 11:48  sean

	* memcache.c, memcache.h: Add a few version functions:

	  mc[m]?_reldate()	  Returns a numeric version of the date the
	  library			version was released: 20050104

	  mc[m]?_vernum()	  Returns a numeric version of the library:
	  010200

	  mc[m]?_version()	  Returns a string version: "1.2.0"

	  Add a few matching #define's too:

		  MEMCACHE_VER
		  MEMCACHE_VERNUM
		  MEMCACHE_RELDATE

	  in the event that someone has cpp(1) skills.

2005-01-03 16:41  sean

	* memcache.c, memcache.h: Expose mc[m]?_server_new() to the public.
	  Another useful function for OOP language wrappers.  Change the
	  default inits from memcache_server_new() to
	  memcache_server_add3().  This may bite a few people who want a
	  default timeout that's non-zero for all servers, but one.  This
	  should be rare though.

2005-01-03 16:15  sean

	* memcache.c, memcache.h: Expose mc[m]?_strdup() as public APIs
	  since it seems as though non-braindamaged versions exist with
	  regards to memory context sensitive APIs (ie, ruby).

2005-01-03 14:27  sean

	* memcache.c, memcache.h: Add a new way of adding a server via:

	  int mcm_server_add3(const struct memcache_ctxt *ctxt, struct
	  memcache *mc, struct memcache_server *ms); int
	  mc_server_add3(struct memcache *mc, struct memcache_server *ms);

	  Useful when writing OOP language wrappers.  mc[m]?_server_add2()
	  is implemented in terms of mc[m]?_server_add3().

2004-12-29 11:58  sean

	* memcache.c, memcache.h: Make mc[m]?_server_free() public.  No one
	  should use this, but it's handy for my ruby bindings, so someone
	  else may find a use/need for this as well.

2004-12-29 10:18  sean

	* memcache.c, memcache.h: Further my quest to piss off as many
	  users as possibly by changing the API for various memory context
	  functions by removing the need for a strdup(3)-like function.
	  This was stupid and I should've provided a static version from
	  day one.  Correct this oversight.  I wonder what other API
	  changes I should make before the 1.2.0 release to get this over
	  with as soon as possible.

2004-12-24 18:34  sean

	* memcache.c: When creating a new memory context, don't check to
	  see if an atomic malloc function was provided.  Instead rely on
	  setup ctxt to check to see if one was provided and rely on its
	  logic instead.  If an atomic malloc function is not specified,
	  use the non-atomic malloc function.  Atomic vs non-atomic malloc
	  functions only matter when using memcache(3) in a GC context.

2004-12-24 18:02  sean

	* memcache.c, memcache.h: Add mc[m]?_server_disconnect() and
	  mc[m]?_server_disconnect_all().

	  Internally, make use of the static function
	  memcache_server_init().

2004-12-24 18:00  sean

	* Makefile.pmk: If we have to rebuild the Makefile, throw in the
	  debug flags.

2004-12-24 17:58  sean

	* regress.c: Disconnect from the server before we loop.  No need to
	  do this, but I want this test in here to make sure things work
	  right.

2004-12-24 17:35  sean

	* memcache.c, memcache.h: Continue my quest to piss of users and
	  rename mc[m]?_find_server() to mc[m]?_server_find().	Apologies
	  to all for this, but I'd rather get this kind of consistency work
	  in now as opposed to gimping along an API that isn't 100% right.

2004-12-24 17:31  sean

	* Makefile.pmk: Have the distclean target actually remove release
	  targets.

2004-12-23 14:34  sean

	* binary_protocol.txt, memcache.4: Add memcache.4, an nroff
	  replacement of the binary protocol document.	Granted the mackup
	  is terrible and should be replaced with proper mdoc(7) markup.
	  That'll probably happen when I add memcache.3 to the mix.
	  document.  Granted the mackup is terrible and should be replaced
	  with proper mdoc(7) markup.  That'll probably happen when I add
	  memcache.3 to the mix. document.  Granted the mackup is terrible
	  and should be replaced with proper mdoc(7) markup.  That'll
	  probably happen when I add memcache.3 to the mix. document.
	  Granted the mackup is terrible and should be replaced with proper
	  mdoc(7) markup.  That'll probably happen when I add memcache.3 to
	  the mix.

2004-12-22 14:37  sean

	* Makefile.pmk, pmkfile: Change the way I handle release numbering
	  so it's all in one file.

2004-12-22 14:22  sean

	* pmkfile: Bump library version to 1.2.

2004-12-22 14:21  sean

	* memcache.c, memcache.h: Piss more people off (sorry!!!), but
	  hopefully not.  Rename mc[m]?_deactivate_server() to
	  mc[m]?_server_deactivate().

	  Add mc[m]?_server_activate_all() which iterates through all
	  available servers and activates servers disabled servers.

2004-12-22 13:49  sean

	* Makefile.pmk: Only remove a release tarball if one exists.  This
	  saves me from typing in my password for sudo(1) when there's
	  nothing there.

2004-12-22 13:43  sean

	* memcache.c, memcache.h: Change the API for mc[m]?_flush_all().
	  This is a better interface and more flexible.  People should be
	  able to figure out a server on their own using the existing API:
	  no sense in providing duplicate functionality at the expense of
	  consistency.

2004-12-22 13:23  sean

	* memcache.h, pmkfile: Remove external dependency on sys/queue.h by
	  including the necessary TAILQ_* macros in memcache.h.  This
	  brings with it the BSD license, which isn't a big deal, but not
	  ideal.  Given I'm only using the TRASHIT, TAILQ_HEAD,
	  TAILQ_ENTRY, TAILQ_FIRST, TAILQ_NEXT, TAILQ_INIT,
	  TAILQ_INSERT_TAIL, and TAILQ_REMOVE macros, I really should just
	  replace this with a cleanroom implementation... problem being the
	  source code compatibility for folks may not be so friendly.

	  Remove detection for sys/queue.h now that it's no longer needed.

2004-12-21 10:32  sean

	* binary_protocol.txt: Add a TODO list of things left to
	  accomplish.

	  Add a Name Space ID to STORE and FETCH Packets.

	  Make the Client Flags required in FETCH Packets.

	  Add an error code signifying that a virtual bucket doesn't exist
	  on this server (ie, you've got the wrong server).

	  Add a FLUSH Packet.

2004-12-20 22:04  sean

	* .cvsignore: Ignore the regress program.

2004-12-20 13:54  sean

	* regress.c: Fix bug in regression tests.  Guess I should've read
	  the warning I wrote in memcache.h.

2004-12-20 13:53  sean

	* .cvsignore: Add ChangeLog to the list of ignored files

2004-12-20 13:52  sean

	* Makefile.pmk: Dynamically create a changelog for every release.

2004-12-20 13:51  sean

	* ChangeLog: Keeping a ChangeLog in CVS was a stupid idea.

2004-12-20 13:50  sean

	* regress.c: Add a set of callback tests.

	  Use MCM_CSTRLEN() instead of strlen(3).

2004-12-20 13:47  sean

	* ChangeLog: Add an announcement for when I added the ChangeLog.

2004-12-20 13:46  sean

	* ChangeLog: Add a ChangeLog.

	  Requested by:   many, many, thousands - scores even! - of people.

2004-12-20 13:41  sean

	* memcache.h: Fix up some comments.

2004-12-20 13:38  sean

	* memcache.c, memcache.h: *) Add a globally defined MCM_CSTRLEN()
	  macro that uses sizeof() instead of	 strlen() to find the size
	  of a string.	This only works for const char *    strings that
	  are compiled in to the binary (ie, do: MCM_CSTRLEN("foo")    but
	  don't do: MCM_CSTRLEN(key)).

	  *) Add fetch callback functionality.	All get/refresh commands
	  can now    execute a callback.  This adds zero overhead in the
	  event that a user    doesn't want callbacks.	Performance is the
	  name of the game here.  See	 the following commit to regress.c
	  for an example.  Callbacks are    registered through the
	  mc[m]?_res_register_fetch_cb() function.

	  *) Internally, use MCM_CSTRLEN() instead of CSTRLEN().

	  *) Set the attempted bit after we call mcm_retrieve_data().

	  *) Add stats for refresh bits.

2004-12-20 12:43  sean

	* Makefile.pmk: Only run the regression test suite once, not 1000
	  times.  If someone wants to, they'll run the command by hand.

2004-12-20 12:38  sean

	* regress.c: Fixup regress.c to match my coding standards.  Various
	  whitespace fixes, remove a global variable, etc.

2004-12-20 10:36  sean

	* memcache.h: Um, our interface has sufficiently diverged from
	  libxml, so I want to avoid explicitly saying we're using a
	  similar model to libxml.  We were, but aren't any more.  Only CVS
	  will know the whole truth.

2004-12-20 10:28  sean

	* memcache.c, memcache.h: Add mc[m]?_res_attempted(),
	  mc[m]?_res_found().  mcm_res_attempted() returns 1 if the given
	  response object has been through a get attempt.  mcm_res_found()
	  returns 1 if a given response object contains valid data.

	  Minor whitespace cleanup from John McCaskey's patches.

	  Shuffled a ton of the header around to allow for the next commit,
	  a callback interface.

2004-12-20 10:22  sean

	* INSTALL, pmkfile: Rename the switch debug_cflags to just debug.
	  pmk -e debug is much more sane.

2004-12-17 23:51  sean

	* binary_protocol.txt: Point the reader in the direction of the
	  STORE Packet when reading about the various bits in the DATA
	  Packet.

	  Per gripe from: Richard 'toast' Russo <russor@msoe.edu>

2004-12-17 23:41  sean

	* regress.c: Add additional regression tests from John McCaskey.
	  These are most helpful and will hopefully be added to and will
	  keep folks out of trouble.

2004-12-17 23:40  sean

	* memcache.c: Small fix from John McCaskey that allows multi-get's
	  to populate their appropriate struct.  As things were, all data
	  was ending up in the first key.  This problem has only existed
	  since rc1 and wasn't present in the past.

2004-12-16 17:00  sean

	* memcache.c, memcache.h: Change MC_RES_* to MCM_RES_*.  Alias
	  MC_RES_* to its MCM_RES_* counter part.  This change was done for
	  consistencies sake so that people can search for mc_* or MC_* in
	  their code and replace it safely with mcm_* or MCM_*.

2004-12-16 16:51  sean

	* memcache.c, memcache.h: Add mcMemFreeCtxt(3).

2004-12-16 15:20  sean

	* memcache.c: Remove useless check.

2004-12-16 14:55  sean

	* Makefile.pmk: Add a sudo when removing a release.

2004-12-16 14:53  sean

	* INSTALL: Add a note about building with debug flags

2004-12-16 14:52  sean

	* Makefile.pmk: Move release name further up in Makefile.pmk and
	  make distclean remove a released local copy.

2004-12-16 14:49  sean

	* memcache.h: Crap, type-o.  Forgot a '*' in a function pointer.

2004-12-16 14:46  sean

	* memcache.c, memcache.h: *) Add mcMallocAtomic back to struct
	  memcache_ctxt.  Now that I know what	  "atomic malloc" is
	  supposed to do, make heavy use of it to speed up the	  case
	  where a calling program has garbage collection (ie, boehm).

	  *) Convert the appropriate calls from mcMalloc() to
	  mcMallocAtomic().	Basically do this in all places where we're
	  not allocating a struct.

	  *) This breaks API, so it's best to get this out of the way where
	  possible.

2004-12-16 14:25  sean

	* Makefile.pmk: Add a few patterns to the distclean target.

2004-12-16 14:17  sean

	* pmkfile: When debugging, having the -g flag in the list of CFLAGS
	  is damn handy.

2004-12-16 14:16  sean

	* binary_protocol.txt: Various updates to the binary protocol
	  document.

2004-12-16 14:15  sean

	* .cvsignore: Add a few files to ignore (.emacs.desktop,
	  .gdb_history)

2004-12-16 14:14  sean

	* regress.c: Add a basic regression test suite.

2004-12-16 14:12  sean

	* memcache.h: Update a few comments

2004-12-16 14:12  sean

	* Makefile.pmk: *) Add the CFLAGS to the linking process when
	  building a shared object.

	  *) Add a reset, test, and regress target for development

2004-12-16 14:07  sean

	* memcache.c: > Addition of function mcm_retrieve_data, which
	  replaces part of the
	  > code in mcm_fetch_line, as well as the code in mcm_get_line
	  when
	  > performing single or multi get commands.  This command checks
	  data is it
	  > is retrived for the VALUE key flags bytes\r\n lines and then
	  ensures
	  > that the amount of data read matches up with they recieved
	  bytes values.
	  > This is the only safe way to read data as assuming the \r\n is
	  the end
	  > of a response or even that END\r\n is the end is unsafe as the
	  data
	  > itself may be arbitrary binary data.

	  Submitted by: 		  John McCaskey <johnm@klir.com>
	  Minor Editorializations/tweaks:  sean

2004-12-16 13:54  sean

	* memcache.c: Update to mcm_get_line(3).  In the words of the patch
	  author:

	  *) removing the re-alignment of the mc->buf that was in your
	  original    code, but was made obsolete by my original changes to
	  read everything    the very first call to mcm_get_line, no need
	  to realign if we aren't    going to be reading anymore, just
	  wastes cpu cycles.

	  *) changing the detection of a read of exactly the number of
	  bytes that	was allowed to only double the buffer, but not
	  immediatley cause another    read() as its possible we are at the
	  end.	I realized that it would be    better to just make room,
	  then continue on to the check for the \r\n,	 and only if it is
	  not there read more.	This eliminates the scenario of    an
	  attempted read with no more data that we had previously since my
	    first update.

	  *) check for "\r\n" at the end of the read data and assume if it
	  is	there that we are done reading.  This is not 100% safe for
	  a get command    or for the stats command.  The get command is
	  handled by the next patch    which makes it not use mcm_get_line,
	  the stats command I'm not too    worried about, but my additional
	  checking for END\r\n if the command is    a stats command could
	  be added back in (I removed it as it sounded like    you were
	  unsure about this additional checking...)

	  Submitted by:   John McCaskey <johnm@klir.com>

2004-12-16 13:38  sean

	* memcache.c: Fix a memory leak in mcm_free(3) where I wasn't
	  free(3)'ing the server list itself.

	  Submitted by:   John McCaskey <johnm@klir.com>

2004-12-15 13:37  sean

	* binary_protocol.txt: More revisions.

2004-12-11 09:40  sean

	* memcache.c: bwahahahahaha!  No wonder perl's hashing function
	  wasn't working right: I forgot to advance the pointer.  This
	  makes much more sense now.

	  Submitted by:   Bob Starr <rstarr@laserbeans.com>

2004-12-09 09:30  sean

	* binary_protocol.txt: Flush out some of the description of the
	  response packet.  Rename the ERROR Packet the RESPONSE Packet.
	  Rename the old RESPONSE Packet to the DATA Packet.

2004-12-08 15:53  sean

	* memcache.c: Fix a few errors with the reading of data.

	  Submitted by:   John McCaskey <johnm@klir.com>

2004-12-08 14:17  sean

	* Makefile.pmk: The install target should always get executed.

2004-12-08 14:16  sean

	* binary_protocol.txt: Commit my first whack at the binary
	  protocol.  I think I forgot a DELETE Packet.	*blush*  I'll have
	  to convert this to nroff(7)/mdoc(7) at some point.  Text just
	  sucks.

2004-12-08 11:57  sean

	* Makefile.pmk, pmkfile: Update for the 1.1 release.  Going to send
	  this out for testing for a few days first before I release it.

2004-12-08 11:56  sean

	* memcache.c, memcache.h: *) Move to having multiple memory
	  contexts and add its supporting API.	*) Nuke calls of
	  sizeof("foo") - 1 and replace with the macro CSTRLEN("foo")

2004-12-07 16:36  sean

	* pmkfile: Only look for pmk if we're in debug mode.  Most users
	  don't need pmk anyway.

2004-12-07 16:27  sean

	* Makefile.pmk: Release 1.0.2

2004-12-07 16:26  sean

	* INSTALL: Add a basic INSTALL file

2004-12-07 16:25  sean

	* memcache.c: Fix a few critical bugs with realloc(3) and in the
	  case where a newline hasn't been found in GET_INIT_BUF_SIZE
	  bytes.

	  Submitted by:   John McCaskey <johnm@klir.com>

2004-12-07 11:20  sean

	* memcache.c: Ah ha!  The strlen() -> sizeof() operation has
	  completed!  This should yield a small performance improvement,
	  hopefully.

2004-12-07 11:12  sean

	* memcache.c, memcache.h: Fix a rather nasty and large bug with the
	  free on delete handling.  Instead of using:

	  if (res->_flags & (MC_RES_FREE_ON_DELETE |
	  MC_RES_NO_FREE_ON_DELETE)) {

	  which would return true if *either* flag was set, use the more
	  precise and correct version:

	  if (res->_flags & (MC_RES_FREE_ON_DELETE |
	  MC_RES_NO_FREE_ON_DELETE) ==	   (MC_RES_FREE_ON_DELETE |
	  MC_RES_NO_FREE_ON_DELETE)) {

	  which solves the problem with mc_aget(3) and likely a host of
	  other bugs.

2004-12-07 11:05  sean

	* Makefile.pmk: Add a release target.

2004-12-06 17:22  sean

	* Makefile.pmk: Bunch of little fixes.

2004-12-06 17:21  sean

	* .cvsignore: Ignore .dylib and .so files

2004-12-06 17:17  sean

	* .cvsignore, Makefile.pmk, memcache.c, memcache.h, pmkfile: I'm
	  tired of chasing bugs in this due to improper version control.
	  Add to my corporate CVS repository until such time as its
	  incorporated into the official memcached(8) repository.

