]> git.evergreen-ils.org Git - OpenSRF.git/commit
Create a new function osrfMessageDeserialize(), as a
authorscottmk <scottmk@9efc2488-bf62-4759-914b-345cdb29e865>
Sun, 15 Nov 2009 17:57:33 +0000 (17:57 +0000)
committerscottmk <scottmk@9efc2488-bf62-4759-914b-345cdb29e865>
Sun, 15 Nov 2009 17:57:33 +0000 (17:57 +0000)
commit903a0d3dbbf979dc9e0109ee2d65da026b08c061
tree5723d2d71e23b42cbcb9552ef649ce5954db6438
parentd1b63e047b6eeacc1eab9810c7482f7f75803afb
Create a new function osrfMessageDeserialize(), as a
replacement for osrf_message_deserialize().

The older osrf_message_deserialize() receives an array of
pointers to populate, along with a maximum number.  If the
JSON input contains more than the maximum number of
messages, the extras are silently discarded.  This design
forces the calling code to guess how many messages it
might ever receive at one time, with no way to determine
whether its guess was good enough.

The newer function returns an osrfList of pointers, and
can therefore return all the messages it finds in the
input, with no risk of loss.

M    include/opensrf/osrf_message.h
M    src/libopensrf/osrf_message.c

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