]> git.evergreen-ils.org Git - OpenSRF.git/commit
Merged _socket_route_data() into its only caller, after untangling its logic.
authorscottmk <scottmk@9efc2488-bf62-4759-914b-345cdb29e865>
Sun, 25 Oct 2009 05:35:47 +0000 (05:35 +0000)
committerscottmk <scottmk@9efc2488-bf62-4759-914b-345cdb29e865>
Sun, 25 Oct 2009 05:35:47 +0000 (05:35 +0000)
commitdebdcd7f724e971a30688b6f9e5a4d8cedc514cd
tree2025546cea46e761a0e7dd3ee9222d28e4101fea
parent03f73b4f671d6bdc7ecff43985ee403d9c20f713
Merged _socket_route_data() into its only caller, after untangling its logic.

The old function traversed the linked list of socket_nodes in a loop,
examining each node at the bottom of the loop in order to identify the next
node.  It went through elaborate and confusing gyrations to avoid dereferencing
a pointer for a node that had been deleted.

A better solution is to get a pointer to the next node *before* deleting the
current one.  The resulting code is simple and easy to understand.

M    src/libopensrf/socket_bundle.c

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1824 9efc2488-bf62-4759-914b-345cdb29e865
src/libopensrf/socket_bundle.c