Make all isds_find_box_by_fulltext() output arguments indirect pointers
commit249d0cda3a7e8d0f45ccfc9fdfd1f6b5c6d2282c
authorPetr Písař <petr.pisar@atlas.cz>
Tue, 30 Dec 2014 15:24:19 +0000 (30 16:24 +0100)
committerPetr Písař <petr.pisar@atlas.cz>
Wed, 31 Dec 2014 19:49:28 +0000 (31 20:49 +0100)
tree9e32933396fd1042b4dd83ce5a4c3bc09f8dbcf9
parent76b81daa626cdb2d50d95c7d0c764e87e2c13e35
Make all isds_find_box_by_fulltext() output arguments indirect pointers

Specification XML Schema allows elements to miss from the response. If
server would send successfull response without these elements, output
arguments of isds_find_box_by_fulltext() function would contain
uninitialized garbage despite of returing IE_SUCCESS.

I decided to accept such response instead of discarding it. First,
accepting any syntactially correct responses is a princip if this
library (be liberate in what you accept). Second, I can forsee that
the ISDSSearch2 service allowing to enumerate all users or to narrow
a query up to one person is questionable from point of view of the
privacy, and the service will be forced to provide more fuzzy data,
like not revealing the actual number of matching boxes.

Therefore this patch changes prototype of isds_find_box_by_fulltext()
function in that way that last five output argument are not pointers
to data type anymore, but they are pointers pointers to automatically
reallocated data types, so one can obtain NULL from the function
declaring the requested value is not avaialable.
src/isds.c
src/isds.h
test/simline/isds_find_box_by_fulltext.c
test/test.h