1. For the "request" command: removed the calls to osrfAppSessionConnect()
authorscottmk <scottmk@9efc2488-bf62-4759-914b-345cdb29e865>
Sat, 6 Feb 2010 20:53:31 +0000 (20:53 +0000)
committerscottmk <scottmk@9efc2488-bf62-4759-914b-345cdb29e865>
Sat, 6 Feb 2010 20:53:31 +0000 (20:53 +0000)
commit7729df86d9b98170f7cb6031cacba18a152c254b
tree3bee6d13bdaae5b76b1f0dbd640f820ea7d3d0dd
parent63764b265ca32d9170c400ea259788be8d626771
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
src/srfsh/srfsh.c