]> git.evergreen-ils.org Git - OpenSRF.git/commit
This update restructures the mechanism for queueing incoming transport
authorscottmk <scottmk@9efc2488-bf62-4759-914b-345cdb29e865>
Mon, 5 Jan 2009 17:36:42 +0000 (17:36 +0000)
committerscottmk <scottmk@9efc2488-bf62-4759-914b-345cdb29e865>
Mon, 5 Jan 2009 17:36:42 +0000 (17:36 +0000)
commitaf61b0530efd864ec78367265a97baa1a9439752
treee979db8b0defd5f39ca5b6e3a668af67148e57fe
parentcb0240132c29bd4b33fb86d247a84441b73d9bc6
This update restructures the mechanism for queueing incoming transport
messages.  In addition, the update to transport_client.c rearranges the
logic a bit in client_recv().

1. A transport_message now carries a pointer to be used in a linked list.
It is initialized to NULL when the message is created.  We no longer use
a separately allocated list node to carry the message.

2. The queue of transport_messages no longer starts with a dummy node.

3. Instead of finding the tail of the queue by traversing the list from
the head, we maintain a separate pointer to the tail node.  Thus the
enqueuing operation occurs in constant time instead of linear time.

4. In client_recv: we now have the dequeueing code in a single place,
instead of duplicating it.

5. In client_recv: I eliminated some conditional compilation that made
no real difference, since both branches of the #ifdef were effectively
identical.

6. In client_recv: changed both loops from while loops to do-while
loops, since in each case we want to perform at least one iteration.

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1570 9efc2488-bf62-4759-914b-345cdb29e865
include/opensrf/transport_client.h
include/opensrf/transport_message.h
src/libopensrf/transport_client.c
src/libopensrf/transport_message.c