]> git.evergreen-ils.org Git - OpenSRF.git/log
OpenSRF.git
13 years agoMinutes and months were reversed in Python logging timestamps
dbs [Tue, 9 Nov 2010 13:50:43 +0000 (13:50 +0000)]
Minutes and months were reversed in Python logging timestamps

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2059 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoAdd a Python and curl example of invoking the Perl simpletext services
dbs [Tue, 9 Nov 2010 01:59:03 +0000 (01:59 +0000)]
Add a Python and curl example of invoking the Perl simpletext services

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2058 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoAdd a streaming version of the split() method in simpletext example
dbs [Tue, 9 Nov 2010 01:57:38 +0000 (01:57 +0000)]
Add a streaming version of the split() method in simpletext example

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2057 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoMake opensrf-perl.pl handle missing configuration for services more gracefully
dbs [Mon, 8 Nov 2010 21:03:55 +0000 (21:03 +0000)]
Make opensrf-perl.pl handle missing configuration for services more gracefully

As we might want to ship configuration files with commented out sections,
this will alert the user that a service was listed in the hosts section
but the configuration for that service could not be found.

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2056 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoPatch from Michael Giarlo to integrate python service control into osrf_ctl.sh.
erickson [Fri, 5 Nov 2010 20:57:43 +0000 (20:57 +0000)]
Patch from Michael Giarlo to integrate python service control into osrf_ctl.sh.

I made the following additional changes:

1. copy opensrf.py into the BIN dir during install when --enable-python is used.

2. osrf_ctl.sh will not attempt to control python services when python is not enabled for opensrf.

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2055 9efc2488-bf62-4759-914b-345cdb29e865

13 years agopatch from Michael Giarlo for better sanity checking during settings file reading...
erickson [Fri, 5 Nov 2010 15:15:53 +0000 (15:15 +0000)]
patch from Michael Giarlo for better sanity checking during settings file reading in python (avoid #comment's)

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2054 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoadded osrf.apps to installed pachages (thanks for the tip, dbs). bumped version...
erickson [Fri, 5 Nov 2010 14:48:14 +0000 (14:48 +0000)]
added osrf.apps to installed pachages (thanks for the tip, dbs).  bumped version in prep for 2.0

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2053 9efc2488-bf62-4759-914b-345cdb29e865

13 years agosocket_bundle typo patch from Jason Stephenson
erickson [Fri, 5 Nov 2010 12:59:00 +0000 (12:59 +0000)]
socket_bundle typo patch from Jason Stephenson

Further discussion and DCO:

http://libmail.georgialibraries.org/pipermail/open-ils-dev/2010-November/006476.html

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2051 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoconsistent w/ the C libs, only log server message processing duration at INFO. log...
erickson [Tue, 26 Oct 2010 14:12:15 +0000 (14:12 +0000)]
consistent w/ the C libs, only log server message processing duration at INFO.  log server response processing duration at debug and w/ slighly different wording.  let the processing duration log message act as the indication of a successfully handled message to reduce logging

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2049 9efc2488-bf62-4759-914b-345cdb29e865

13 years agolog message processing duration at INFO level, instead of DEBUG, consistent with...
erickson [Mon, 25 Oct 2010 16:28:23 +0000 (16:28 +0000)]
log message processing duration at INFO level, instead of DEBUG, consistent with the C libs

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2047 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoPlug a minor memory leak that could occur when we opened a TCP connection
scottmk [Thu, 14 Oct 2010 16:30:17 +0000 (16:30 +0000)]
Plug a minor memory leak that could occur when we opened a TCP connection
to a server.  In practice this meant whenever we opened a Jabber session.

We call getaddrinfo() to get a dynamically allocated linked list of
addresses for a given server name.  Then we traverse the list, looking
for one that accepts streaming connections over IPV4, in order to get
an IP address.

At the end, we call freeaddrinfo() to free the linked list.

Previously we would pass to freeaddrinfo() a pointer, not to the
head of the list, but to the node that we used for getting an IP
address.  Prior nodes, if any, would leak.

Also: added calls to freeaddrinfo() in the case of early returns, to
avoid leaking the list in the event of an error.

M    src/libopensrf/socket_bundle.c

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2036 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoimplemented an optional per-service stderr log for capturing miscellaneous stderr...
erickson [Tue, 12 Oct 2010 14:53:41 +0000 (14:53 +0000)]
implemented an optional per-service stderr log for capturing miscellaneous stderr output from services, similar to the old-style _unix.log files, since there are often useful warnings and error messages that never bubble up to syslog.  for clarity, the files now use _stderr as a suffix instead of _unix.  stderr logs are enabled by default.  included opensrf.xml example of how to disable it for a given service

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2035 9efc2488-bf62-4759-914b-345cdb29e865

13 years agowhen we add xhr responses onto the end of the queue, stash the original session as...
erickson [Tue, 12 Oct 2010 02:58:16 +0000 (02:58 +0000)]
when we add xhr responses onto the end of the queue, stash the original session as well, otherwise we're attempting to ask a session questions about requests it's not tracking

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2031 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoin json encoder, replace 2 sub calls w/ 1 hash lookup in heavily called code path...
erickson [Thu, 7 Oct 2010 12:57:56 +0000 (12:57 +0000)]
in json encoder, replace 2 sub calls w/ 1 hash lookup in heavily called code path.  we lose some abstraction, but it's probably worth it here

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2030 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoWork around a Net::Domain bug that can result in fqdn's like foo.example.com,bar.com
dbs [Tue, 28 Sep 2010 17:35:26 +0000 (17:35 +0000)]
Work around a Net::Domain bug that can result in fqdn's like foo.example.com,bar.com

The bug manifested when trying to run autogen.sh, with the output:
Updating fieldmapper
No Response from settings server...going to sleep

This was because SettingsParser was generating invalid XPath and consquently
errors in the opensrf.settings service; with no response, the attempt to run
autogen.sh would die.

This workaround splits the fqdn on commas and tries each possible domain in
the server setting XPath. Long term we either need to wait for Net::Domain
bug #60729 (https://rt.cpan.org/Public/Bug/Display.html?id=60729) to be
resolved, or consider alternatives.

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2029 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoreturn the trace-augmented message as written to the log
miker [Tue, 28 Sep 2010 00:04:19 +0000 (00:04 +0000)]
return the trace-augmented message as written to the log

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2028 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoremoving vestigial references to Inbound.pm, which no longer exists in the repository...
erickson [Mon, 13 Sep 2010 15:44:11 +0000 (15:44 +0000)]
removing vestigial references to Inbound.pm, which no longer exists in the repository.  this also removes get/set_listener, which were never taken advantage of and are no longer of use since the listener is thoroughly hard-coded into the opensrf stack now

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2024 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoBump trunk version number for OpenSRF up to 1.8.0; better than 1.4.0.
dbs [Thu, 9 Sep 2010 17:09:42 +0000 (17:09 +0000)]
Bump trunk version number for OpenSRF up to 1.8.0; better than 1.4.0.

perlmodstyle says "A correct CPAN version number is a floating point
number with at least 2 digits after the decimal." so we're not in
compliance in any case. Oh well.

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2023 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoUpdate the manifest for Perl modules to avoid build warnings
dbs [Sun, 5 Sep 2010 02:31:35 +0000 (02:31 +0000)]
Update the manifest for Perl modules to avoid build warnings

r2016 removed two Perl modules, src/perl/lib/OpenSRF/Transport/SlimJabber/Inbound.pm
and src/perl/lib/OpenSRF/UnixServer.pm, and the build gets upset because the
manifest suggests they're missing. But no, we know where they are, and we
don't expect them to come back.

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2021 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoadded support for reading ContinueStatus opensrf messages in the JS opensrf lib
erickson [Wed, 1 Sep 2010 17:34:56 +0000 (17:34 +0000)]
added support for reading ContinueStatus opensrf messages in the JS opensrf lib

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2019 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoupdated mailing address of the FSF
gmc [Wed, 1 Sep 2010 13:56:12 +0000 (13:56 +0000)]
updated mailing address of the FSF

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2018 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoremove executable bit from module files that don't need it
gmc [Wed, 1 Sep 2010 13:43:25 +0000 (13:43 +0000)]
remove executable bit from module files that don't need it

Small nit to pick for Debianization.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2017 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoReplace Net::Server with local pre-forking server
erickson [Wed, 1 Sep 2010 00:17:12 +0000 (00:17 +0000)]
Replace Net::Server with local pre-forking server

Support max/min children and max/min spare children
For more, see http://libmail.georgialibraries.org/pipermail/open-ils-dev/2010-May/006068.html

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2016 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoremove ntp and ntpdate dependencies
gmc [Tue, 31 Aug 2010 20:49:44 +0000 (20:49 +0000)]
remove ntp and ntpdate dependencies

Not used by OpenSRF; these are legacies of
Evergreen dependencies at the time OpenSRF was
split off.  Quite likely a bunch of deps in
Makefile.install aren't needed by OpenSRF
proper.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2015 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoDue to the async nature of xmllhttprequest, processing http responses (which often...
erickson [Wed, 18 Aug 2010 20:11:18 +0000 (20:11 +0000)]
Due to the async nature of xmllhttprequest, processing http responses (which often lead to further async-request laden callbacks) at receive time can result in out-of-order message handling.  To bring order to this chaos, push all inbound message onto a queue, then go back to processing the older messages in order of oldest to newest.

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2008 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoA few minor tweaks in the name of const-correctness.
scottmk [Mon, 16 Aug 2010 16:27:32 +0000 (16:27 +0000)]
A few minor tweaks in the name of const-correctness.

M    src/router/osrf_router_main.c

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2007 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoSeveral minor and inconsequential changes:
scottmk [Mon, 16 Aug 2010 15:18:08 +0000 (15:18 +0000)]
Several minor and inconsequential changes:

1. Tidied up the white space in a few places.

2. Commented out several unused functions, used only for development,
in order to eliminate some annoying compiler warnings.

3. Added the const qualifier to several variables.

4. Added three branches to a switch/case structure, in order to
eliminate some compiler warnings about untested enum values.  The
new branches merely issue warning messages to the log (presumably
we don't expect to see RESULT or STATUS messages in this
context).

M    src/gateway/osrf_http_translator.c

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2006 9efc2488-bf62-4759-914b-345cdb29e865

13 years ago1. Pedantic change for const-correctness: replaced all calls to
scottmk [Sun, 15 Aug 2010 00:57:53 +0000 (00:57 +0000)]
1. Pedantic change for const-correctness: replaced all calls to
jsonObjectGetKey() with calls to jsonObjectGetKeyConst().

2. Tidied up white space and comments here and there.

M    src/router/osrf_router_main.c

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2005 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoPedantic change for const-correctness: change three calls to
scottmk [Sat, 14 Aug 2010 21:38:11 +0000 (21:38 +0000)]
Pedantic change for const-correctness: change three calls to
jsonObjectGetKey() to call jsonObjectGetKeyConst() instead.

M    src/gateway/osrf_http_translator.c

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2004 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoPedantic change for const-correctness: replace two calls to
scottmk [Sat, 14 Aug 2010 21:14:55 +0000 (21:14 +0000)]
Pedantic change for const-correctness: replace two calls to
jsonObjectGetKey() with calls to jsonObjectGetKeyConst().

M    src/libopensrf/osrf_parse_json.c

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2003 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoMinor performance tweak: replace a call to buffer_add()
scottmk [Sat, 14 Aug 2010 20:48:08 +0000 (20:48 +0000)]
Minor performance tweak: replace a call to buffer_add()
with a call to buffer_add_n().

In this case we already know how many characters to add,
so we can avoid a call to strlen().

M    src/libopensrf/osrf_prefork.c

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2002 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoAdd some macros for upward compatibility from the old JSON parser.
scottmk [Sat, 14 Aug 2010 11:33:08 +0000 (11:33 +0000)]
Add some macros for upward compatibility from the old JSON parser.

These macros map the old functions to the equivalent new ones.

M    include/opensrf/osrf_json.h

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2001 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoEliminate the old JSON parser, implemented in osrf_json_parser.c and
scottmk [Sat, 14 Aug 2010 11:09:47 +0000 (11:09 +0000)]
Eliminate the old JSON parser, implemented in osrf_json_parser.c and
the associated header osrf_json_utils.h.

This parser has been completely replaced by a newer one implemented
in osrf_parse_json.c, plus an incremental JSON parser (so far
unused) in jsonpush.c..

The even older parser of JSON-with-comments is not affected.

D    include/opensrf/osrf_json_utils.h
M    include/opensrf/osrf_json.h
D    src/libopensrf/osrf_json_parser.c
M    src/libopensrf/osrf_json_object.c
M    src/libopensrf/Makefile.json
M    src/libopensrf/osrf_json_tools.c
M    src/libopensrf/Makefile.am
M    src/libopensrf/osrf_parse_json.c
M    Makefile.am

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2000 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoGet the extra_debs into Squeeze as well; fix a typo in libmemcached-tools
dbs [Fri, 13 Aug 2010 17:21:51 +0000 (17:21 +0000)]
Get the extra_debs into Squeeze as well; fix a typo in libmemcached-tools

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1999 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoMake the names of the rules for installing extra Squeeze debs line up
dbs [Fri, 13 Aug 2010 16:31:12 +0000 (16:31 +0000)]
Make the names of the rules for installing extra Squeeze debs line up

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1998 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoMake log length in Perl logger a configurable value to assist debugging
dbs [Fri, 13 Aug 2010 16:20:01 +0000 (16:20 +0000)]
Make log length in Perl logger a configurable value to assist debugging

If logging to syslog instead of a file, you might need to adjust the
syslog configuration to accept longer than its own default lengths of
log messages

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1997 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoMinor cleanup:
scottmk [Fri, 13 Aug 2010 16:16:25 +0000 (16:16 +0000)]
Minor cleanup:

Changed two calls to buffer_add(), when appending a single character,
to call buffer_add_char() instead, which is slightly more efficient.

M    src/srfsh/srfsh.c

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1996 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoFirst cut at adding Debian Squeeze to OpenSRF prerequisite installer
dbs [Fri, 13 Aug 2010 16:16:05 +0000 (16:16 +0000)]
First cut at adding Debian Squeeze to OpenSRF prerequisite installer

Along the way, make a few other changes:
  * drop Debian Etch and Gentoo support
  * add dscott@laurentian.ca to the author list
  * remove Class::DBI as that's actually a prereq for Evergreen, not OpenSRF

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1995 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoAdding comments and tinkering with white space.
scottmk [Wed, 11 Aug 2010 02:58:25 +0000 (02:58 +0000)]
Adding comments and tinkering with white space.
No substantive changes.

M    src/libopensrf/osrf_prefork.c

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1994 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoProvide a way for a service to set the effective buffer size for a
scottmk [Tue, 10 Aug 2010 02:13:39 +0000 (02:13 +0000)]
Provide a way for a service to set the effective buffer size for a
specified method.

Non-atomic methods accumulate RESULT messages into a buffer, from which
they are flushed when the buffer is about to overflow, or when the
closing STATUS message is issued.

The new osrfMethodSetBufferSize() function allows the service to favor
large buffers (for greater throughput) or small ones (for a lower
latency for the first response).

Since the buffersize is not an absolute limit, the effective buffer
size may be set to zero, in which case each RESULT message will be
packaged and sent in a separate XMPP message as soon as it is ready.

Changing the buffer size has no effect on an atomic method, nor on a
method that returns only one RESULT message.

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

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1993 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoCruft removal; there should be no outwardly visible effects.
scottmk [Mon, 9 Aug 2010 16:18:05 +0000 (16:18 +0000)]
Cruft removal; there should be no outwardly visible effects.

1. Remove the OSRF_METHOD_ATOMIC and OSRF_METHOD_SYSTEM options
from the interface functions osrfRegisterMethod() and
osrfRegisterExtendedMethod().

An application cannot usefully apply these options when it registers
a method, and if it tries, it will almost certainly not work as
intended anyway.

This change required considerable refactoring of the code
responsible for registering methods.

2. When the attempt to initialize an application fails, remove
the application from the application list and destroy it,
instead of keeping it around in an unusable state.

3. Eliminate some redundant lookups of application by name
when registering system methods.

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

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1992 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoFixed a bug in the chunking.
scottmk [Mon, 9 Aug 2010 12:31:33 +0000 (12:31 +0000)]
Fixed a bug in the chunking.

Short version: The non-atomic system methods weren't working.  Now
they are.

Long version: When a method returns a value greater than zero, a
post-processing step sends a STATUS message to signify that the
response is complete.  In the old code this post-processing
bypassed the buffer-flushing step, so that anything still in the
buffer didn't get sent.

The non-atomic system methods returned positive return codes and
were therefore subject to this problem.  I don't know if any
non-system methods return postive return codes, but if they do,
they would also have been affected.

M    src/libopensrf/osrf_application.c

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1991 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoset transaction ID by default to make it easier to trace requests from srfsh
gmc [Thu, 5 Aug 2010 17:40:45 +0000 (17:40 +0000)]
set transaction ID by default to make it easier to trace requests from srfsh

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1990 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoalways use respond_complete to finish a request, whether there is a final message...
miker [Wed, 4 Aug 2010 17:32:20 +0000 (17:32 +0000)]
always use respond_complete to finish a request, whether there is a final message or not

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1989 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoImplement the chunking of OSRF messages. I.e. bundle multiple
scottmk [Wed, 4 Aug 2010 03:20:33 +0000 (03:20 +0000)]
Implement the chunking of OSRF messages.  I.e. bundle multiple
OSRF messages into an XMPP message, up to about 10k bytes, so
as to reduce networking overhead.

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

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1988 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoMike, when adding the length, actually add the length, not the string
miker [Tue, 3 Aug 2010 02:47:00 +0000 (02:47 +0000)]
Mike, when adding the length, actually add the length, not the string

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1987 9efc2488-bf62-4759-914b-345cdb29e865

13 years ago1. Add a buffer to osrfAppSession structure; for future use
scottmk [Thu, 29 Jul 2010 19:38:21 +0000 (19:38 +0000)]
1. Add a buffer to osrfAppSession structure; for future use

2. New function osrfSendTransportPayload().  This a repackaging of
existing functionality pulled out into a separate function so that
it can be reused in other contexts.

These changes are preparation for future changes, and will have no
visible effect by themselves.

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

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1986 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoAdd response chunking support to the Perl implementation of OpenSRF
miker [Thu, 29 Jul 2010 17:40:03 +0000 (17:40 +0000)]
Add response chunking support to the Perl implementation of OpenSRF

Two new optional paramters to register_method are now supported:
 * max_chunk_size
 * max_chunk_count

OpenSRF has always supported message bundling, but only respond_complete made
use of this fact by sending the final result message and the completion status
message in the same XMPP envelope.  Now, on a per method basis, RESULT messages
can be bundled (cached) until one of three conditions occurs:

 * The size of the JSON of the RESULT messages matches or exceeds max_chunk_size
 * The number of RESULT messages cached matches or exceeds max_chunk_count
 * respond_complete is called (which happens implicitly by returning from a method)

Because the overhead of sending multiple XMPP messages far outweighs the caching
and cache management costs of chunking, the default for max_chunk_size is set
at 10240 bytes (10k).  The default for max_chunk_count is 0.  To turn off chunking
completely, set the max_chunk_size register_method parameter to 0.

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1985 9efc2488-bf62-4759-914b-345cdb29e865

13 years ago1. Make osrfMessageToJSON() available at global scope.
scottmk [Thu, 29 Jul 2010 14:24:58 +0000 (14:24 +0000)]
1. Make osrfMessageToJSON() available at global scope.

2. New function osrf_message_set_result() -- a more efficient alternative
to osrf_message_set_result_content().

Typically when using the older function, we convert a jsonObject to JSON
text, and then parse the JSON text back into a jsonObject.  With the new
function we can avoid the round trip through the text format.

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

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1984 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoWhitespace / description cleanup
dbs [Tue, 13 Jul 2010 06:11:14 +0000 (06:11 +0000)]
Whitespace / description cleanup

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1983 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoTeach opensrf-perl.pl the same PID directory as osrf_ctl.sh
dbs [Tue, 13 Jul 2010 06:10:48 +0000 (06:10 +0000)]
Teach opensrf-perl.pl the same PID directory as osrf_ctl.sh

This should cut down on one more command-line option when working
with individual Perl services.

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1982 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoTypo fix to display all OpenSRF methods: sysemt -> system
dbs [Tue, 13 Jul 2010 06:09:14 +0000 (06:09 +0000)]
Typo fix to display all OpenSRF methods: sysemt -> system

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1981 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoRecent testing has been with libmemcached 0.40; bring that into line
dbs [Thu, 1 Jul 2010 04:09:56 +0000 (04:09 +0000)]
Recent testing has been with libmemcached 0.40; bring that into line

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1975 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoMove on up to Lucid; drop Karmic along the way
dbs [Thu, 1 Jul 2010 02:56:28 +0000 (02:56 +0000)]
Move on up to Lucid; drop Karmic along the way

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1974 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoProvide a mechanism whereby a server drone can terminate immediately,
scottmk [Thu, 24 Jun 2010 16:56:45 +0000 (16:56 +0000)]
Provide a mechanism whereby a server drone can terminate immediately,
without waiting for max_requests or a DISCONNECT message.

Motivation: a drone may determine that it is incapacitated and can neither
complete the current request nor service subsequent ones.

In particular, it may lose a database connection.

Mechanism: set a switch in the current osrfAppSession.  In osrf_prefork.c,
inspect this switch after every method call, and bail out if it's set.

M    include/opensrf/osrf_app_session.h
M    src/libopensrf/osrf_app_session.c
M    src/libopensrf/osrf_prefork.c

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1969 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoAdd a bit of bulletproofing.
scottmk [Tue, 22 Jun 2010 15:35:03 +0000 (15:35 +0000)]
Add a bit of bulletproofing.

When a drone finishes servicing a request, it writes a brief message
to a pipe, to notify the listener that it's available for another request.

Change: if the write to the pipe is not successful, log an error message
and terminate.  Otherwise the drone would become undead and unreachable.

M    src/libopensrf/osrf_prefork.c

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1968 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoRearrange the way that a listener juggles its drones.
scottmk [Tue, 22 Jun 2010 04:23:09 +0000 (04:23 +0000)]
Rearrange the way that a listener juggles its drones.

Instead of maintaining a single circular linked list including both active
processes and idle processes, keep the active drones in the circular list
and the idle drones in a separate linear list; move them back and forth
as needed.  This change simplifies how we search for drones when we need
them, because we don't have to skip over ones that we don't want.

The list of idle drones acts as a stack.  When we look for an idle drone
for a new request, we pick the one at the head of the list, which is the
last one to have become idle.

As a result, we pick the drone that is most likely still to be in memory.

In the old arrangment, the list acted as a queue.  When picking an idle
drone, we picked the one that had been idle the longest -- which was the
one most likely to have been swapped out.

Also: added a number of doxygen-style comments, and tinkered with the
white space here and there.

Note: an earlier commit tried to make similar changes, but it had to be
backed out because it mangled the linkage pointers in some situations,
leading to segfaults.  That problem has now been corrected.

M    src/libopensrf/osrf_prefork.c

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1967 9efc2488-bf62-4759-914b-345cdb29e865

13 years ago1. Changed an error message to make it clearer. This is the message that
scottmk [Thu, 17 Jun 2010 13:50:29 +0000 (13:50 +0000)]
1. Changed an error message to make it clearer.  This is the message that
relays an error message from the Jabber server.

2. Tidied up some white space.

M    src/libopensrf/transport_session.c

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1966 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoRemove cruft - unused definitions of DEF_RECV_TIMEOUT and DEF_QUEUE_SIZE
dbs [Wed, 16 Jun 2010 02:44:57 +0000 (02:44 +0000)]
Remove cruft - unused definitions of DEF_RECV_TIMEOUT and DEF_QUEUE_SIZE

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1965 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoMerge updated Makefile.install patch from Lee Dickens <ldickens@esilibrary.com>
dbs [Wed, 16 Jun 2010 00:43:32 +0000 (00:43 +0000)]
Merge updated Makefile.install patch from Lee Dickens <ldickens@esilibrary.com>

Lee's patch moves some Perl modules from RPM installs to CPAN installs.

Also merging my own patch to break lengthy ejabberd install process out onto
multiple lines; will be easier to read + to patch if the time comes.

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1964 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoRename example Apache configuration file to include ".conf" suffix
dbs [Tue, 15 Jun 2010 14:03:58 +0000 (14:03 +0000)]
Rename example Apache configuration file to include ".conf" suffix

This is useful on systems like Fedora that require the .conf suffix to act
on files in a conf.d subdirectory, and is generally useful for visually
distinguishing the purpose of the file.

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1963 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoApply patch from Lee Dickens <ldickens@esilibrary.com> for better RHEL5/CentOS prereq...
dbs [Tue, 15 Jun 2010 10:32:59 +0000 (10:32 +0000)]
Apply patch from Lee Dickens <ldickens@esilibrary.com> for better RHEL5/CentOS prereq support

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1962 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoTeach autoconf about Fedora-ish default locations
dbs [Tue, 15 Jun 2010 03:13:41 +0000 (03:13 +0000)]
Teach autoconf about Fedora-ish default locations

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1961 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoA few more Python dependencies that we don't need to compile
dbs [Tue, 15 Jun 2010 02:38:23 +0000 (02:38 +0000)]
A few more Python dependencies that we don't need to compile

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1960 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoAdd in a few dependencies for Fedora 13
dbs [Tue, 15 Jun 2010 02:23:39 +0000 (02:23 +0000)]
Add in a few dependencies for Fedora 13

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1959 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoFirst rough attempt at Fedora 13 support
dbs [Tue, 15 Jun 2010 02:04:38 +0000 (02:04 +0000)]
First rough attempt at Fedora 13 support

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1958 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoWhen traversing a list of osrfMessages: don't free the messages.
scottmk [Mon, 14 Jun 2010 18:31:32 +0000 (18:31 +0000)]
When traversing a list of osrfMessages: don't free the messages.
The list owns them.  Instead, get the list to free them when
you're done, by calling osrfListClear().

M    src/router/osrf_router.c

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1957 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoadded some debugging / sanity checks to python gateway response handler
erickson [Sun, 23 May 2010 22:26:09 +0000 (22:26 +0000)]
added some debugging / sanity checks to python gateway response handler

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1956 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoEliminate the daemonize_write_pid function (thereby reverting a
scottmk [Fri, 7 May 2010 20:18:36 +0000 (20:18 +0000)]
Eliminate the daemonize_write_pid function (thereby reverting a
previous change).

It works better, and is less convoluted, to write the PID file from
the child process instead of from the parent process.

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

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1955 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoWrite the PID file from the child process (the one that launches the
scottmk [Fri, 7 May 2010 16:40:35 +0000 (16:40 +0000)]
Write the PID file from the child process (the one that launches the
listeners), not from the parent process; and only if it actually launches
a listener.

Otherwise if there are no C apps to launch, the child would die immediately,
leaving the PID file hanging around to confuse the surrounding shell script.

M    src/libopensrf/osrf_system.c

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1954 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoFix a bug that occasionally caused OSRF not to shut down cleanly.
scottmk [Tue, 4 May 2010 13:41:16 +0000 (13:41 +0000)]
Fix a bug that occasionally caused OSRF not to shut down cleanly.

The osrf_ctl.sh script had been using ps + grep to capture
the process ID (PID) of the opensrf-c daemon so that it could
send a SIGINT signal to it later to shut it down.  However the
script was also capturing the PIDs of the daemon's child processes
(i.e. the listener processes), which hadn't yet changed to
application-specific names.

As a result, when shutting down, the listener processes would
receive signals from two different sources: from the opensrf-c
daemon and from the surrounding shell script.  If the signal
from opensrf-c got there first, the kill from the script would
fail, and the script would abort, even though the process had
been successfully killed.

The solution is for opensrf.c to write the daemon's PID directly
to a file, instead of relying on ps + grep to capture it.  The
file name is specified by an additional command line parameter,
which (for upward compatibility) is currently optional.

Because this change involves a change to the osrf_ctl.sh
script, it will be necessary to run configure before the
usual make and make install.  If you are using the usual
configuration, run the following from within the OSRF
trunk directory:

./configure --prefix=/openils --sysconfdir=/openils/conf

If you don't run configure, the old osrf_ctl.sh script will
continue to work as it has in the past, and you won't get
the benefit of the change.

M    include/opensrf/utils.h
M    include/opensrf/osrf_system.h
M    src/libopensrf/utils.c
M    src/libopensrf/opensrf.c
M    src/libopensrf/osrf_system.c
M    bin/osrf_ctl.sh.in

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1953 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoSet the appname to the logging routines at the beginning of
scottmk [Mon, 3 May 2010 02:23:59 +0000 (02:23 +0000)]
Set the appname to the logging routines at the beginning of
osrfAppRegisterApplication() instead of at the end, so that messages
issued during initialization of the application will be properly
identified.  This change particularly affects apps that do a lot
of initialization, such as cstore, rstore, and pcrud.

M    src/libopensrf/osrf_application.c

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1952 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoMake it possible to install just OpenSRF Python with ./configure --disable-core ...
dbs [Sat, 24 Apr 2010 13:34:17 +0000 (13:34 +0000)]
Make it possible to install just OpenSRF Python with ./configure --disable-core --enable-python

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1951 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoRemove Ubuntu Intrepid support - EOL is this month (https://wiki.ubuntu.com/Releases)
dbs [Sat, 24 Apr 2010 13:33:14 +0000 (13:33 +0000)]
Remove Ubuntu Intrepid support - EOL is this month (https://wiki.ubuntu.com/Releases)

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1950 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoGutsy is way out of support, pull it from the list
dbs [Thu, 22 Apr 2010 15:02:30 +0000 (15:02 +0000)]
Gutsy is way out of support, pull it from the list

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1948 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoFix the jsonFormatString function.
scottmk [Wed, 21 Apr 2010 20:48:18 +0000 (20:48 +0000)]
Fix the jsonFormatString function.

Specifically: it was misbehaving when a string literal contained
a comma, square bracket, or curly brace.  Now it pays attention to
whether those characters are in within quotes or not, and treats
them accordingly.

It also applies more consistent indentation by consuming
extraneous white space that would otherwise lead to ragged margins.

M    src/libopensrf/osrf_json_tools.c

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1946 9efc2488-bf62-4759-914b-345cdb29e865

14 years agoForward-port r1943: install packaged DateTime Perl modules instead of CPAN
dbs [Thu, 15 Apr 2010 05:45:08 +0000 (05:45 +0000)]
Forward-port r1943: install packaged DateTime Perl modules instead of CPAN

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1944 9efc2488-bf62-4759-914b-345cdb29e865

14 years agoApply the const qualifier to the return value from osrfMessageGetResult().
scottmk [Mon, 22 Mar 2010 20:55:56 +0000 (20:55 +0000)]
Apply the const qualifier to the return value from osrfMessageGetResult().

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

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1942 9efc2488-bf62-4759-914b-345cdb29e865

14 years agoApply the const qualifier to one variable. Tidy up white space.
scottmk [Mon, 22 Mar 2010 19:46:09 +0000 (19:46 +0000)]
Apply the const qualifier to one variable.  Tidy up white space.

M    src/gateway/osrf_json_gateway.c

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1941 9efc2488-bf62-4759-914b-345cdb29e865

14 years agoAdded a const qualifier to one variable.
scottmk [Mon, 22 Mar 2010 19:21:15 +0000 (19:21 +0000)]
Added a const qualifier to one variable.

Tidied up white space.

M    src/c-apps/osrf_version.c

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1940 9efc2488-bf62-4759-914b-345cdb29e865

14 years agoTidying up white space; no substantive changes.
scottmk [Mon, 22 Mar 2010 19:11:57 +0000 (19:11 +0000)]
Tidying up white space; no substantive changes.

M    src/c-apps/osrf_math.c

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1939 9efc2488-bf62-4759-914b-345cdb29e865

14 years agojust adding a marker for where the "peer domain" logic should likely be plugged in
miker [Thu, 18 Mar 2010 18:35:56 +0000 (18:35 +0000)]
just adding a marker for where the "peer domain" logic should likely be plugged in

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1938 9efc2488-bf62-4759-914b-345cdb29e865

14 years agoA small performance tweak.
scottmk [Tue, 16 Mar 2010 04:41:04 +0000 (04:41 +0000)]
A small performance tweak.

When we receive a new message, we update current_locale with the
locale of the message.

The tweak: if current_locale is already the same as the locale of
the message (which is presumably most of the time in practice), then
don't update it.  That way we avoid a malloc() and a free().

M    src/libopensrf/osrf_message.c

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1937 9efc2488-bf62-4759-914b-345cdb29e865

14 years agoMiscellaneous minor changes. mostly for clarity:
scottmk [Mon, 8 Mar 2010 03:26:03 +0000 (03:26 +0000)]
Miscellaneous minor changes. mostly for clarity:

1. Changed return type of _osrfAppRegisterSysMethods from int to void,
since we never looked at the return code anyway.

2. In osrfAppRegisterApplication(): 0pen the shared object before
allocating an osrfApplication, so that we don't have to free the
osrfApplication if the open fails.

3. In osrfAppRegisterExtendedMethod(): when creating an atomic method,
pass the userData pointer to _osrfAppBuildMethod() instead of
installing it on a separate line.

4. In _osrfAppBuildMethod(): for an atomic method, build the method
name correctly the first time, instead of building it incorrectly
and later replacing it.

5. In osrfAppRunMethod(): rearranged things a bit for clarity.
Simplified the declaration and dereferencing of the meth pointer.

6. In osrfAppIntrospect(): Introduced an early return in order to
reduce the level of indentation of the rest of the function.  Moved
some declarations closer to their first uses.

7. In osrfAppIntrospectAll(): moved the declaration of resp into the
loop where it is used.

8. Finished adding doxygen-style comments to document the functions.
Touched up the white space here and there.

M    src/libopensrf/osrf_application.c

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1935 9efc2488-bf62-4759-914b-345cdb29e865

14 years agoApply patch from Lee Dickens <ldickens@esilibrary.com> to add support for RedHat...
dbs [Tue, 2 Mar 2010 21:02:33 +0000 (21:02 +0000)]
Apply patch from Lee Dickens <ldickens@esilibrary.com> to add support for RedHat/CentOS

Also, remove support for Ubuntu Gutsy while we're in the file

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1934 9efc2488-bf62-4759-914b-345cdb29e865

14 years agoTidying up various things; nothing very substantial.
scottmk [Fri, 26 Feb 2010 03:57:11 +0000 (03:57 +0000)]
Tidying up various things; nothing very substantial.

1. Added newlines and indentation within long macros to make them look
more like real code.

2. The OSRF_METHOD_VERIFY_DESCRIPTION macro is not used anywhere.  I
moved it from the header into the implementation file and commented it
out, preserving it like a fly in amber in case we ever want to revive it.

3. Moved the definition of the struct osrfApplication from the header
into the application file, since no other file references it.

4. Moved the OSRF_SYSMETHOD_* macros from the header into the implementation
file, since they are not referenced elsewhere.

5. Turned _osrfAppFindApplication() and osrfAppFindMethod into inline
functions, since each is a trivial wrapper for another function.

6. Added a formal void parameter to osrfAppRunExitCode, so that its
signature is a prototype rather than a mere declaration.

7. Removed a couple of redundant sanity checks.

8. Further tinkered with comments and white space.

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

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1933 9efc2488-bf62-4759-914b-345cdb29e865

14 years agoTidy up white space and comments; no substantive changes.
scottmk [Wed, 24 Feb 2010 04:11:37 +0000 (04:11 +0000)]
Tidy up white space and comments; no substantive changes.

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

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1932 9efc2488-bf62-4759-914b-345cdb29e865

14 years ago1. Refactored _do_client() and _do_server() so as to untangle some
scottmk [Wed, 24 Feb 2010 02:51:29 +0000 (02:51 +0000)]
1. Refactored _do_client() and _do_server() so as to untangle some
needlessly convoluted and confusing logic.

2. In particular: eliminated osrf_stack_application_handler() altogether,
breaking it into pieces and incorporating them into the calling functions.

3. Added doxygen-style comments to document all functions.

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

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1931 9efc2488-bf62-4759-914b-345cdb29e865

14 years agoSimple demo of text services; returning a string, an array, a hash
dbs [Tue, 23 Feb 2010 03:01:21 +0000 (03:01 +0000)]
Simple demo of text services; returning a string, an array, a hash

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1930 9efc2488-bf62-4759-914b-345cdb29e865

14 years ago1. Added doxygen-style comments to document all functions.
scottmk [Mon, 22 Feb 2010 17:53:35 +0000 (17:53 +0000)]
1. Added doxygen-style comments to document all functions.

2. For osrfConfigHasDefault() and osrfConfigCleanup(): added a formal void parameter
so that the header will contain prototypes rather than mere declarations.

3. In osrfConfigValueObject: added a sanity check for a non-loaded configuration.

4. In osrfConfigGetValueList(): replaced a call to jsonObjectToSimpleString() with
a call to jsonObjectGetString(), in order to eliminate a malloc() and free().

5. Tidied up the white space here and there.

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

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1929 9efc2488-bf62-4759-914b-345cdb29e865

14 years ago1. Reworked the xmlDocToJSON and _xmlDocToJSON functions for clarity.
scottmk [Sun, 21 Feb 2010 02:31:58 +0000 (02:31 +0000)]
1. Reworked the xmlDocToJSON and _xmlDocToJSON functions for clarity.
In particular: _xmlDocToJSON() now returns void, and requires its
second parameter (the jsonObject*) to be non-NULL.  The old version
behaved differently depending on whether the second parameter was NULL.
I found that arrangement confusing.

2. Finished adding doxygen-style comments; removed comments from the
header so that they won't override the more complete comments in the
implementation file.

3. Tinkered with white space here and there.

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

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1928 9efc2488-bf62-4759-914b-345cdb29e865

14 years ago1. Change xmlSaxAttr() to return const char* instead of
scottmk [Mon, 15 Feb 2010 02:48:49 +0000 (02:48 +0000)]
1. Change xmlSaxAttr() to return const char* instead of
non-const char*.

2. Add some doxygen-style comments.

3. Tidy up the white space here and there.

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

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1927 9efc2488-bf62-4759-914b-345cdb29e865

14 years agofix usage example
phasefx [Wed, 10 Feb 2010 21:14:43 +0000 (21:14 +0000)]
fix usage example

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1926 9efc2488-bf62-4759-914b-345cdb29e865

14 years agoTidying up various things; nothing substantial.
scottmk [Sun, 7 Feb 2010 16:14:41 +0000 (16:14 +0000)]
Tidying up various things; nothing substantial.

1. Moved most of the header into the implementation, since most of it
is not referenced anywhere else, and is not likely ever to be.

2. Sprinkled the const qualifier here and there.

3. Cleaned up the white space and comments a bit.

M    src/jserver/osrf_chat.c
M    src/jserver/osrf_chat.h

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1923 9efc2488-bf62-4759-914b-345cdb29e865

14 years ago1. For the "request" command: removed the calls to osrfAppSessionConnect()
scottmk [Sat, 6 Feb 2010 20:53:31 +0000 (20:53 +0000)]
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

14 years agoEnsure target JavaScript directory is created before copying files into it
dbs [Fri, 5 Feb 2010 18:41:07 +0000 (18:41 +0000)]
Ensure target JavaScript directory is created before copying files into it

Thanks to Warren Layton for spotting this on a fresh install

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1921 9efc2488-bf62-4759-914b-345cdb29e865

14 years agoForward-port r1919 from rel_1_2 to prevent Internet Explorer from making multipart...
dbs [Wed, 3 Feb 2010 18:54:31 +0000 (18:54 +0000)]
Forward-port r1919 from rel_1_2 to prevent Internet Explorer from making multipart-mixed-replace calls

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1920 9efc2488-bf62-4759-914b-345cdb29e865

14 years agoadd non-destructive methods for grabbing first and last responses on the response...
miker [Wed, 3 Feb 2010 15:15:30 +0000 (15:15 +0000)]
add non-destructive methods for grabbing first and last responses on the response queue

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1918 9efc2488-bf62-4759-914b-345cdb29e865

14 years agoForward-port r1908 + r1914 from rel_1_2 to improve portability without breaking
dbs [Tue, 2 Feb 2010 17:11:29 +0000 (17:11 +0000)]
Forward-port r1908 + r1914 from rel_1_2 to improve portability without breaking

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1915 9efc2488-bf62-4759-914b-345cdb29e865

14 years agoRearrange the error handling a bit in send_request(). The old code
scottmk [Mon, 1 Feb 2010 04:32:48 +0000 (04:32 +0000)]
Rearrange the error handling a bit in send_request().  The old code
looked like it would segfault in the case of a relay command.

M    src/srfsh/srfsh.c

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1913 9efc2488-bf62-4759-914b-345cdb29e865