1. For the "request" command: removed the calls to osrfAppSessionConnect()
and osrf_app_session_disconnect(). There's no point in opening and closing
a connection for a single request.
2. For the "math_bench" command: coerce the first command argument to a
positive value. In the old code, a zero value led to a division-by-zero,
and a negative value led to a segfault.
3. For the "math_bench" command: accept an optional second parameter
to control whether and when we call osrf_app_session_disconnect(). It
has valid values of 0 (the default), 1, and 2; values out of range are
coerced to valid values.
4. In do_math(): initialize the array of floats by setting each float
to zero, instead of by using memset() to fill the array with
all-bits-zero. The C Standard does not guarantee that all-bits-zero
represents zero for a float.
(This last change shouldn't make any difference anyway, because each float
in the array is overwritten before it is read. Still, anything not worth
doing is not worth doing badly.)
M src/srfsh/srfsh.c
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1922
9efc2488-bf62-4759-914b-
345cdb29e865