]> git.evergreen-ils.org Git - OpenSRF.git/log
OpenSRF.git
9 years agoLP#1268619: websockets: gateway code repairs & confing options
Bill Erickson [Tue, 11 Mar 2014 21:25:19 +0000 (17:25 -0400)]
LP#1268619: websockets: gateway code repairs & confing options

* avoid unneccessary and wrong incantation of apr_thread_exit.  The two
  sub-threads now both live for the duration of the process.
* to be safe, create thread mutex before threads

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1268619: websockets: apply syslog name in gateway
Bill Erickson [Mon, 10 Mar 2014 19:55:24 +0000 (15:55 -0400)]
LP#1268619: websockets: apply syslog name in gateway

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1268619: websockets: README typo repairs
Bill Erickson [Mon, 10 Mar 2014 12:41:45 +0000 (08:41 -0400)]
LP#1268619: websockets: README typo repairs

Patch from Warren Layton to repair path to 'envvars' and clarify some
text.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1268619: websockets : additional apache config docs
Bill Erickson [Thu, 6 Mar 2014 20:47:36 +0000 (15:47 -0500)]
LP#1268619: websockets : additional apache config docs

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1268619: websockets: apache conf -> info logging
Bill Erickson [Thu, 6 Mar 2014 20:05:12 +0000 (15:05 -0500)]
LP#1268619: websockets: apache conf -> info logging

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1268619: websockets: remove single-tab JS WS implementation
Bill Erickson [Wed, 5 Mar 2014 13:40:05 +0000 (08:40 -0500)]
LP#1268619: websockets: remove single-tab JS WS implementation

It was falling behind the shared lib in bug fixes and features.  A
per-tab WS implementation is (maybe) a dangerous thing to have around,
as well, since it encourages /many/ connections.  Can resurrect later if
needed.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1268619: websockets: shared worker path; JS api_level
Bill Erickson [Tue, 4 Mar 2014 19:10:59 +0000 (14:10 -0500)]
LP#1268619: websockets: shared worker path; JS api_level

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1268619: websockets: initial C libs api_level support
Bill Erickson [Mon, 3 Mar 2014 21:23:44 +0000 (16:23 -0500)]
LP#1268619: websockets: initial C libs api_level support

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1268619: websockets : gateway log inbound messages at internal
Bill Erickson [Mon, 3 Mar 2014 21:01:58 +0000 (16:01 -0500)]
LP#1268619: websockets : gateway log inbound messages at internal

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1268619: websocket : add JS lib to makefile
Bill Erickson [Mon, 3 Mar 2014 17:06:12 +0000 (12:06 -0500)]
LP#1268619: websocket : add JS lib to makefile

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1268619: websocket: avoid module auto configuration
Bill Erickson [Mon, 3 Mar 2014 15:29:23 +0000 (10:29 -0500)]
LP#1268619: websocket: avoid module auto configuration

We don't want osrf_websocket_translator to be directly loaded as a
module, since it is not an apache module, but a shared library loaded by
an apache module (mod_websockets).  This is especially true of the default
apache instance.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1268619: websocket : apache gateway minor fixes
Bill Erickson [Mon, 3 Mar 2014 15:05:26 +0000 (10:05 -0500)]
LP#1268619: websocket : apache gateway minor fixes

Replace remaining remote_ip calls with a get_client_ip() function which
operates for apache2 and apache4.

Make log functions for applying a log trace value accept const char*'s

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1268619: websocket : more JS api docs
Bill Erickson [Mon, 3 Mar 2014 14:42:03 +0000 (09:42 -0500)]
LP#1268619: websocket : more JS api docs

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1268619: websockets : added config docs to install readme
Bill Erickson [Thu, 16 Jan 2014 16:41:01 +0000 (11:41 -0500)]
LP#1268619: websockets : added config docs to install readme

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1268619: websocket JS libs: reconnect and auto-connect
Bill Erickson [Tue, 14 Jan 2014 21:25:20 +0000 (16:25 -0500)]
LP#1268619: websocket JS libs: reconnect and auto-connect

JS clients no longer need to explicitly call the shared WS setup
routine.  It happens under the covers now.

JS client detects disconnects and reconnects when the next message send
attempt occurs.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1268619: websocket translator idle timeout / graceful shutdown
Bill Erickson [Tue, 14 Jan 2014 21:22:23 +0000 (16:22 -0500)]
LP#1268619: websocket translator idle timeout / graceful shutdown

Added support for an idle timeout and idle check interval configuration
variables.  These allow each websocket apache process to kick off
clients that have been connected and are idle for too long, thus hogging
a process unnecessarily.

Added a SIGUSR1 signal handler which forces the idle timeout to be very
low and a short re-check period so that the client can be kicked as soon
as there are no open conversations.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1268619: websockets: support WS via shared web workers
Bill Erickson [Fri, 10 Jan 2014 16:57:29 +0000 (11:57 -0500)]
LP#1268619: websockets: support WS via shared web workers

This allows mutiple browser tabs to share the same websocket connection.

TODO: add tab (port) disconnect handler
TODO: more docs / examples

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1268619: websocket: do not disconnect ws() on osrf disconnect message
Bill Erickson [Thu, 9 Jan 2014 20:00:03 +0000 (15:00 -0500)]
LP#1268619: websocket: do not disconnect ws() on osrf disconnect message

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1268619: temporary websocket installer README
Bill Erickson [Tue, 5 Feb 2013 15:22:34 +0000 (10:22 -0500)]
LP#1268619: temporary websocket installer README

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1268619: Sample Websocket translator Apache 2.2 configuration
Bill Erickson [Tue, 5 Feb 2013 14:52:57 +0000 (09:52 -0500)]
LP#1268619: Sample Websocket translator Apache 2.2 configuration

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1268619: websocket gateway: improved memory mgt; logging
Bill Erickson [Fri, 25 Jan 2013 17:38:13 +0000 (12:38 -0500)]
LP#1268619: websocket gateway: improved memory mgt; logging

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1268619: websockets; free temporary osrf msgs; minor comment change
Bill Erickson [Mon, 21 Jan 2013 16:34:57 +0000 (11:34 -0500)]
LP#1268619: websockets; free temporary osrf msgs; minor comment change

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1268619: websocket; docs, more memory mgmt
Bill Erickson [Mon, 10 Dec 2012 19:33:14 +0000 (14:33 -0500)]
LP#1268619: websocket; docs, more memory mgmt

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1268619: websocket translator
Bill Erickson [Mon, 12 Nov 2012 21:46:19 +0000 (16:46 -0500)]
LP#1268619: websocket translator

* starting packet inspection
* activity log; recipient removal
* only cache connected recipients; use request_rec pool for session_pool parent
* wrap all thread work in mutex
* session memory goodness

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1268619: websocket JS additions
Bill Erickson [Thu, 8 Nov 2012 17:36:16 +0000 (12:36 -0500)]
LP#1268619: websocket JS additions

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1268619: track websocket_plugin.h locally until replaced by makefile.install process
Bill Erickson [Tue, 30 Oct 2012 19:51:18 +0000 (15:51 -0400)]
LP#1268619: track websocket_plugin.h locally until replaced by makefile.install process

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1268619: websocket gateway repairs and cleanup
Bill Erickson [Mon, 29 Oct 2012 21:27:44 +0000 (17:27 -0400)]
LP#1268619: websocket gateway repairs and cleanup

* use jsonObjectFree() on jsonObjets, not free();
* removed some debugging logs
* accommodate API changes for Apache 2.4
* safer logging:

  Avoid using ap_log_rerror, in particular referencing server->request
  from the responder thread, since the request_rec will be invalid after
  on_disconnect is called.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1268619: Apache websocket translator module
Bill Erickson [Fri, 26 Oct 2012 19:06:13 +0000 (15:06 -0400)]
LP#1268619: Apache websocket translator module

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1268619: OpenSRF JS websockets plugin
Bill Erickson [Thu, 20 Sep 2012 19:55:04 +0000 (15:55 -0400)]
LP#1268619: OpenSRF JS websockets plugin

Adds an opensrf_ws.js handler.  Requries some small modifications to
opensrf.js.  Load opensrf_ws.js in DojoSRF.

For now, to use, add to script:

OpenSRF.Session.transport = OSRF_TRANSPORT_TYPE_WS;

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1337401: Only care about our own processes
Mike Rylander [Fri, 20 Jun 2014 20:48:51 +0000 (16:48 -0400)]
LP#1337401: Only care about our own processes

OpenSRF can run mutiple times, as different users, on one host.
Right now we look for all service processes, but we should only
look for our own. This patch does that.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1315525: Add trusty target and remove lucid from README
Ben Shum [Fri, 18 Apr 2014 20:36:38 +0000 (16:36 -0400)]
LP#1315525: Add trusty target and remove lucid from README

Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1315525: Updating Makefile.install for Ubuntu 14.04. Removing lucid support.
Chris Sharp [Sun, 26 Jan 2014 15:41:31 +0000 (10:41 -0500)]
LP#1315525: Updating Makefile.install for Ubuntu 14.04. Removing lucid support.

Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1286248: remove osrf_ctl.sh
Galen Charlton [Fri, 28 Feb 2014 17:33:19 +0000 (09:33 -0800)]
LP#1286248: remove osrf_ctl.sh

As osrf_ctl.sh was deprecated in favor of osrf_control, this patch
removes the deprecated script entirely.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
9 years agoLP#1285915: document that perl2JSON doesn't order hash keys
Galen Charlton [Wed, 2 Apr 2014 22:24:06 +0000 (15:24 -0700)]
LP#1285915: document that perl2JSON doesn't order hash keys

This patch documents that JSON strings returned by
OpenSRF::Utils::JSON->perl2JSON() should not be expected to have
hash keys sorted in any particular order.  It also adjusts a
corresponding test case to consistently pass under Perl 5.18, which
introduces hash order randomization.

Forcing JSON output to be in canonical form is another option, and
easily done by JSON::XS, but would add overhead.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
9 years agoLP#1234816: improve const-correctness of osrfCachePutString and osrfCachePutObject
Galen Charlton [Wed, 2 Apr 2014 23:05:33 +0000 (16:05 -0700)]
LP#1234816: improve const-correctness of osrfCachePutString and osrfCachePutObject

Since the cache key is not modified by osrfCachePutString and
osrfCachePutObject, this patch changes the key parameter of those
two functions from char* to const char*.  It also updates one
caller osrfCachePutObject to not cast away const-ness.

This patch has no functional impact, but enables future callers
of osrfCachePut* to pass constant strings without having to
cast away the const-ness.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
9 years agoLP#1306044 Removing deprecated jabber register script
Bill Erickson [Thu, 10 Apr 2014 17:27:34 +0000 (13:27 -0400)]
LP#1306044 Removing deprecated jabber register script

This script is no longer user, since ejabberdctrl is used instead.
What's more, this script uses a Perl package (libnet-jabber-perl) which
is no longer available in Debian (Jessie).

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
9 years agoLP#1306044 Debian Jessie Makefile.install target
Bill Erickson [Thu, 10 Apr 2014 16:05:08 +0000 (12:05 -0400)]
LP#1306044 Debian Jessie Makefile.install target

* Removes Perl Net::Jabber as a dependency.  There is no Jessie package
  for this and OpenSRF hasn't used it in a long time.

* Leaving Debian Squeeze in place for now

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1292214: Improve docgen output
Mike Rylander [Thu, 13 Mar 2014 20:55:19 +0000 (16:55 -0400)]
LP#1292214: Improve docgen output

Docgen output would be a bit more useful if it respected the formatting
(such as it is) of the signature content provided by the developer. So,
let's make that happen.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1179660: remove OpenSRF.pm AUTOLOAD
Bill Erickson [Mon, 13 May 2013 20:19:51 +0000 (16:19 -0400)]
LP#1179660: remove OpenSRF.pm AUTOLOAD

Instead of simply producing an error message in the OpenSRF logs, calls
to nonexistent subroutines are now fatal errors which will stop code
execution.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1286198: use --ignore-orphans rather than --are-there-no-prisons
Galen Charlton [Fri, 7 Mar 2014 16:22:38 +0000 (08:22 -0800)]
LP#1286198: use --ignore-orphans rather than --are-there-no-prisons

The joke was fine while it lasted, but might be confusing to somebody
who doesn't catch the literary reference.  This patch also fixes
a minor typo.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1286198: Teach osrf_router to (optionally) write its own PID files
Lebbeous Fogle-Weekley [Tue, 4 Feb 2014 22:56:07 +0000 (17:56 -0500)]
LP#1286198: Teach osrf_router to (optionally) write its own PID files

Also, tiny bit of noise squelching on osrf_control/opensrf-perl.pl

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1286198: Offer ability to ignore what seem like orphan processes when starting...
Lebbeous Fogle-Weekley [Fri, 31 Jan 2014 20:50:01 +0000 (15:50 -0500)]
LP#1286198: Offer ability to ignore what seem like orphan processes when starting things

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1286198: When doing router-specific things, we don't need as much configuration...
Lebbeous Fogle-Weekley [Thu, 30 Jan 2014 23:32:24 +0000 (18:32 -0500)]
LP#1286198: When doing router-specific things, we don't need as much configuration loaded

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1284137: Avoid WARN logging on router shutdown
Bill Erickson [Mon, 24 Feb 2014 14:09:46 +0000 (09:09 -0500)]
LP#1284137: Avoid WARN logging on router shutdown

Log received signals as DEBUG (misc signal) or INFO (during shutdown)
in the router, since these are not error conditions, but normal
operations.

A warning may ultimately be logged at a higher level when the signal is
unexpected.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1155446: add Debian/Ubuntu deps required for Python tests to pass
Galen Charlton [Fri, 15 Mar 2013 14:22:17 +0000 (10:22 -0400)]
LP#1155446: add Debian/Ubuntu deps required for Python tests to pass

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoLP#1066131: srfsh.py should not require opensrf.settings
Bill Erickson [Fri, 12 Oct 2012 20:57:15 +0000 (16:57 -0400)]
LP#1066131: srfsh.py should not require opensrf.settings

Update srfsh.py to connect to the opensrf network without automatically
reading the opensrf.setting server data.  This allows srfsh.py to run a
non-private network.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1170484: log failure to load library for C app as an error
Galen Charlton [Thu, 18 Apr 2013 20:14:00 +0000 (16:14 -0400)]
LP#1170484: log failure to load library for C app as an error

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoMerge branch 'rel_2_3'
Galen Charlton [Fri, 31 Jan 2014 21:40:58 +0000 (16:40 -0500)]
Merge branch 'rel_2_3'

10 years agofix typo and remove repeated word
Galen Charlton [Fri, 31 Jan 2014 21:20:26 +0000 (16:20 -0500)]
fix typo and remove repeated word

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoosrf_control router-de/re-register and reload commands
Bill Erickson [Tue, 7 Jan 2014 19:06:06 +0000 (14:06 -0500)]
osrf_control router-de/re-register and reload commands

Added support for the following new command line options:

--router-de-register
--router-de-register-all
    Sends a SIGUSR1 signal to the selected service(s), which causes each
    service's listener process to send an "unregister" command to all
    registered routers.  The --all variant sends the signal to all
    running listeners.  The non-(--all) variant requires a --service.

--router-re-register
--router-re-register-all
    Sends a SIGUSR2 signal to the selected service(s), which causes each
    service's listener process to send a "register" command to all
    configured routers routers.  The --all variant sends the signal to
    all running listeners.  The non-(--all) variant requires a --service.

--reload
--reload-all
    Sends a SIGHUP signal to the selected service(s).  SIGHUP causes
    each Listener process to reload its opensrf_core.xml config file
    and gracefully re-launch drone processes.  The -all variant sends
    the signal to all services.  The non-(-all) variant requires a
    --service.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agox
Galen Charlton [Fri, 31 Jan 2014 21:25:16 +0000 (16:25 -0500)]
x

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agotypo fix
Galen Charlton [Fri, 31 Jan 2014 21:20:26 +0000 (16:20 -0500)]
typo fix

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoosrf_control router-de/re-register and reload commands
Bill Erickson [Tue, 7 Jan 2014 19:06:06 +0000 (14:06 -0500)]
osrf_control router-de/re-register and reload commands

Added support for the following new command line options:

--router-de-register
--router-de-register-all
    Sends a SIGUSR1 signal to the selected service(s), which causes each
    service's listener process to send an "unregister" command to all
    registered routers.  The --all variant sends the signal to all
    running listeners.  The non-(--all) variant requires a --service.

--router-re-register
--router-re-register-all
    Sends a SIGUSR2 signal to the selected service(s), which causes each
    service's listener process to send a "register" command to all
    configured routers routers.  The --all variant sends the signal to
    all running listeners.  The non-(--all) variant requires a --service.

--reload
--reload-all
    Sends a SIGHUP signal to the selected service(s).  SIGHUP causes
    each Listener process to reload its opensrf_core.xml config file
    and gracefully re-launch drone processes.  The -all variant sends
    the signal to all services.  The non-(-all) variant requires a
    --service.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agorecover osrf_control router start
Bill Erickson [Thu, 21 Nov 2013 21:37:38 +0000 (16:37 -0500)]
recover osrf_control router start

With the addition of service verification, which ensures that a service
is meant to run on the requested host, we lost the ability to start the
router by itself, since the router is never explicitly configured to run
anywhere.  This patch assumes the router is always a valid service.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
10 years agorecover osrf_control router start
Bill Erickson [Thu, 21 Nov 2013 21:37:38 +0000 (16:37 -0500)]
recover osrf_control router start

With the addition of service verification, which ensures that a service
is meant to run on the requested host, we lost the ability to start the
router by itself, since the router is never explicitly configured to run
anywhere.  This patch assumes the router is always a valid service.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
10 years agoOpenSRF client disconnect robustification (Perl)
Bill Erickson [Thu, 5 Dec 2013 17:27:44 +0000 (12:27 -0500)]
OpenSRF client disconnect robustification (Perl)

* Improve detection of client connection state with jabber server

  Be more aggressive in testing and responding to failed connectivity.
  It can happen in various ways, depending on what's happening to the
  jabber server (death, delay, graceful shutdown).  With these changes
  we attempt to cover all the bases and detect as early as possible that
  a connection has died, specifically when trying to create a new
  connection after one has failed.

* Do a better job of cleaning up dead connections

  Transport::PeerHandle now has a reset() action which disconnects (when
  possible) and clears the global connection reference.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoOpenSRF client disconnect robustification (Perl)
Bill Erickson [Thu, 5 Dec 2013 17:27:44 +0000 (12:27 -0500)]
OpenSRF client disconnect robustification (Perl)

* Improve detection of client connection state with jabber server

  Be more aggressive in testing and responding to failed connectivity.
  It can happen in various ways, depending on what's happening to the
  jabber server (death, delay, graceful shutdown).  With these changes
  we attempt to cover all the bases and detect as early as possible that
  a connection has died, specifically when trying to create a new
  connection after one has failed.

* Do a better job of cleaning up dead connections

  Transport::PeerHandle now has a reset() action which disconnects (when
  possible) and clears the global connection reference.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoProtect subrequests from post-complete messages
Mike Rylander [Thu, 16 May 2013 14:17:15 +0000 (10:17 -0400)]
Protect subrequests from post-complete messages

Subrequests (AKA method_lookup()-based API calls) sometimes append
final-lvalue responses to the response list even after respond_complete()
has been called from within the implementation method.  This commit
discards all post-respond_complete values, protecting against extra,
spurious values being returned to the ultimate client.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1180849: test case - ignoring subrequest responses after respond_complete()
Galen Charlton [Mon, 16 Dec 2013 16:08:51 +0000 (08:08 -0800)]
LP#1180849: test case - ignoring subrequest responses after respond_complete()

This patch adds a regression test for verifying that subrequests
ignore additional responses after respond_complete() is called.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoProtect subrequests from post-complete messages
Mike Rylander [Thu, 16 May 2013 14:17:15 +0000 (10:17 -0400)]
Protect subrequests from post-complete messages

Subrequests (AKA method_lookup()-based API calls) sometimes append
final-lvalue responses to the response list even after respond_complete()
has been called from within the implementation method.  This commit
discards all post-respond_complete values, protecting against extra,
spurious values being returned to the ultimate client.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1180849: test case - ignoring subrequest responses after respond_complete()
Galen Charlton [Mon, 16 Dec 2013 16:08:51 +0000 (08:08 -0800)]
LP#1180849: test case - ignoring subrequest responses after respond_complete()

This patch adds a regression test for verifying that subrequests
ignore additional responses after respond_complete() is called.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoAdd some additional boolean-related JSON tests
Jeff Godin [Tue, 3 Dec 2013 18:52:39 +0000 (13:52 -0500)]
Add some additional boolean-related JSON tests

Add some additional boolean-related JSON tests, enable use strict /
use warnings for JSON tests.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1257264: Use the built-in JSON-y test for bools
Mike Rylander [Tue, 3 Dec 2013 14:57:39 +0000 (09:57 -0500)]
LP#1257264: Use the built-in JSON-y test for bools

This removes a dependency on internal details of JSON::XS's
implementation of Boolean types which changed with the release
of JSON::XS 3.0.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jeff Godin <jgodin@tadl.org>
10 years agoLP#1257264: make test cases for JSON::XS Boolean-ness more generic
Galen Charlton [Tue, 3 Dec 2013 17:43:54 +0000 (09:43 -0800)]
LP#1257264: make test cases for JSON::XS Boolean-ness more generic

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jeff Godin <jgodin@tadl.org>
10 years agoAdd some additional boolean-related JSON tests
Jeff Godin [Tue, 3 Dec 2013 18:52:39 +0000 (13:52 -0500)]
Add some additional boolean-related JSON tests

Add some additional boolean-related JSON tests, enable use strict /
use warnings for JSON tests.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1257264: Use the built-in JSON-y test for bools
Mike Rylander [Tue, 3 Dec 2013 14:57:39 +0000 (09:57 -0500)]
LP#1257264: Use the built-in JSON-y test for bools

This removes a dependency on internal details of JSON::XS's
implementation of Boolean types which changed with the release
of JSON::XS 3.0.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jeff Godin <jgodin@tadl.org>
10 years agoLP#1257264: make test cases for JSON::XS Boolean-ness more generic
Galen Charlton [Tue, 3 Dec 2013 17:43:54 +0000 (09:43 -0800)]
LP#1257264: make test cases for JSON::XS Boolean-ness more generic

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jeff Godin <jgodin@tadl.org>
10 years agoLP#1224647: remove two invalid tests
Galen Charlton [Thu, 12 Sep 2013 19:37:57 +0000 (12:37 -0700)]
LP#1224647: remove two invalid tests

The patch for bug 1204123 changes the client_recv()
to not set the transport_client error flag, as most
of the circumstances where it would have been set were
for cases where the call to select() was interrupted
by a signal, which is not an error per se.

This patch removes two tests that were therefore
made invalid, restoring the ability of the test suite
to pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
10 years agoosrf_control --start/stop/restart-services
Bill Erickson [Thu, 5 Sep 2013 14:32:09 +0000 (10:32 -0400)]
osrf_control --start/stop/restart-services

Provide commands for controling non-router services.  This is useful in
a multi-server environment where the router runs on a different server.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
10 years agoLP#1204123 repair makefile.am warning
Bill Erickson [Tue, 3 Sep 2013 18:56:27 +0000 (14:56 -0400)]
LP#1204123 repair makefile.am warning

Avoid trailing space after backslash

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
10 years agoLP#1204123 osrf_control warn and exit on bad host
Bill Erickson [Fri, 30 Aug 2013 18:17:02 +0000 (14:17 -0400)]
LP#1204123 osrf_control warn and exit on bad host

Any time a start action is issued (start, start_all, restart,
restart_all), osrf_control will first verify that the selected hostname
(or localhost) hosts the requested service(s).  If not, the user is
warned and the script exits before any action is taken.

Note: we do not make a similar verification for stop and signal actions,
since those may be reasonably be used even when a service is not
configured to run on the selected host.

Thanks to Jason Stephenson for the suggestion.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
10 years agoLP#1204123 osrf_control --diagnostic improvements
Bill Erickson [Fri, 30 Aug 2013 17:09:27 +0000 (13:09 -0400)]
LP#1204123 osrf_control --diagnostic improvements

Assessing the state of each PID for each service for error conditions.

Minor cleanup.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
10 years agoLP#1204123 osrf_control --diagnostic
Bill Erickson [Fri, 30 Aug 2013 15:27:49 +0000 (11:27 -0400)]
LP#1204123 osrf_control --diagnostic

Command prints information about running services, including
descrepencies between running vs configured and PS listing vs PID files.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
10 years agoLP1204123 osrf_ctl.sh improvement
Bill Erickson [Tue, 27 Aug 2013 19:56:46 +0000 (15:56 -0400)]
LP1204123 osrf_ctl.sh improvement

Removing no-longer-supported --verbose flag from osrf_ctl.sh stub

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
10 years agoLP1204123 osrf_control doc updates
Bill Erickson [Tue, 27 Aug 2013 19:52:48 +0000 (15:52 -0400)]
LP1204123 osrf_control doc updates

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
10 years agoC SIGHUP handling and config reloading
Bill Erickson [Tue, 27 Aug 2013 15:47:52 +0000 (11:47 -0400)]
C SIGHUP handling and config reloading

Sending the HUP signal to a C Listener process now results in the
following:

 * Reload the opensrf_core config
 * update the log file level
 * kill idle child processes
 * child processes that are active when the signal is received are
   tracked and killed once they become idle.
 * New children are spawned per the min child settings

The primary use case for these changes is temporarily changing the log
level for a given service for debug purposes.  It may also
be used, for example, to gracefully recover excess RAM consumed by a
child process.

opensrf.xml (opensrf.settings config) is not reloaded, so min/max child
settings will not be affected.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
10 years agoLP1204123 more osrf_ctl/control script cleanup
Bill Erickson [Fri, 16 Aug 2013 14:07:10 +0000 (10:07 -0400)]
LP1204123 more osrf_ctl/control script cleanup

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
10 years agoLP1204123 more osrf_ctl/control script cleanup
Bill Erickson [Fri, 16 Aug 2013 14:04:55 +0000 (10:04 -0400)]
LP1204123 more osrf_ctl/control script cleanup

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
10 years agoLP1204123 osrf_control improved sample usage
Bill Erickson [Mon, 12 Aug 2013 15:39:28 +0000 (11:39 -0400)]
LP1204123 osrf_control improved sample usage

Use a more realistic default usage message.  --config and --pid-dir have
sane defaults, so people will not normally need to specify those.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
10 years agoLP1204123 install opensrf-perl.pl as osrf_control
Bill Erickson [Mon, 12 Aug 2013 15:33:11 +0000 (11:33 -0400)]
LP1204123 install opensrf-perl.pl as osrf_control

Symlink osrf_control to opensrf-perl.pl to act as the replacement for
osrf_ctl.sh.  I chose "osrf_control" since it matches more closely to
"osrf_config" -- also it's probably less confusing than calling it
osrf_ctl, which would likely get confused w/ osrf_ctl.sh

TODO: documentation

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
10 years agoLP1204123 opensrf-perl.pl improve logging
Bill Erickson [Mon, 12 Aug 2013 15:31:56 +0000 (11:31 -0400)]
LP1204123 opensrf-perl.pl improve logging

Log messages by default.  Replace --verbose flag with --quiet flag.

Also treat all messages the same, instead of separating them into info
and debug.  They're all pretty useful.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
10 years agoLP1204123 opensrf-perl.pl expansion continued
Bill Erickson [Fri, 9 Aug 2013 14:40:29 +0000 (10:40 -0400)]
LP1204123 opensrf-perl.pl expansion continued

* improved cleanup of stale pid files during startup
* added --force-clean-process option to kill orphan (no pidfile)
  processes during startup
* other minor cleanup

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
10 years agoLP1204123 opensrf-perl.pl expansion / replace osrf_ctl
Bill Erickson [Mon, 5 Aug 2013 20:58:26 +0000 (16:58 -0400)]
LP1204123 opensrf-perl.pl expansion / replace osrf_ctl

opensrf-perl.pl can now stop/start/signal/etc. all opensrf services,
regardless of language.  It is in effect a replacement for osrf_ctl.sh
with considerably broader powers.

To ease transition, osrf_ctl.sh has been taught to pass
start/stop/restart_all commands through to opensrf-perl.pl.

The layout of commands has changed some (e.g. --start-all instead of
--action start_all) and a host of new commands have been added.

Below are the full set of commands.  See --help for full descriptions:

--config
--pid-dir
--settings-startup-pause
--localhost
--service
--verbose
--no-daemon
--help
--start-all
--start
--restart-all
--restart
--stop-all
--stop
--graceful-shutdown-all
--graceful-shutdown
--fast-shutdown-all
--fast-shutdown
--immediate-shutdown-all
--immediate-shutdown
--kill-with-fire
--signal-all
--signal
--signal-timeout

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
10 years agoLP1204123 Remove osrf_ctl debug echos
Bill Erickson [Thu, 1 Aug 2013 14:39:21 +0000 (10:39 -0400)]
LP1204123 Remove osrf_ctl debug echos

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
10 years agoLP1204123 Improved per-service control (C/Perl)
Bill Erickson [Wed, 31 Jul 2013 21:43:12 +0000 (17:43 -0400)]
LP1204123 Improved per-service control (C/Perl)

C opensrf no longer mantains a single master process.  Instead, like
Perl, each Listener process writes its own PID file and can be managed
individually.  Related to this, much code was cleaned up in
osrf_system.c.

osrf_ctl.sh now has the ability to stop/start individual services for
Perl and C, using the new -s <service> option.  Examples:

osrf_ctl.sh -l -a restart_c -s opensrf.math
osrf_ctl.sh -l -a restart_perl -s opensrf.settings

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
10 years agoLP1204123 osrf_ctl.sh supports sending signals
Bill Erickson [Wed, 31 Jul 2013 13:34:19 +0000 (09:34 -0400)]
LP1204123 osrf_ctl.sh supports sending signals

Using the following new options to osrf_ctl.sh, the script can now send
signals to any/all OpenSRF Listener processes:

-a signal / signal_all
-k <signal> [value passed to 'kill -s']
-s <service>

With an action of 'signal' and service provided by -s, the specified
signal is sent only to the listener process of the service.

With an action of 'signal_all', the specified signal is sent to all
listener prcesses.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
10 years agoLP1204123 Don't treat interrupts as errors
Bill Erickson [Wed, 24 Jul 2013 20:28:15 +0000 (16:28 -0400)]
LP1204123 Don't treat interrupts as errors

Interrupted calls to select() are generally not errors, but more likely
signals received by the process.  Avoid setting the transport_client
error flag to true in these cases.  Otherwise, after one signal is
received, no other outbound communication can occur on the client
connection.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
10 years agoLP1204123 SIGUSR2 causes router re-register (Perl/C)
Bill Erickson [Tue, 23 Jul 2013 16:06:48 +0000 (12:06 -0400)]
LP1204123 SIGUSR2 causes router re-register (Perl/C)

When a listener process receives the USR2 signal, the 'register' command
is sent to all known routers.  This allows for the addition of new
routers to running opensrf services.

If a register command is sent to a router for which the process is
already successfully register, the router will safely discard it, so
multiple SIGUSR2 calls are safe.

Minor int => bool clarification repair to existing C shutdown
(prefork_clear) code.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
10 years agoLP1204123 opensrf.settings reload file option
Bill Erickson [Tue, 23 Jul 2013 15:31:34 +0000 (11:31 -0400)]
LP1204123 opensrf.settings reload file option

opensrf.settings API calls

opensrf.settings.host_config.get
opensrf.settings.default_config.get

now sport an additional "reload" boolean parameter.  When set, the settings
file (opensrf.xml) will be reloaded from the file system to pick up any
changes which have occurred since the last load/reload.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
10 years agoLP1204123 SIGTERM graceful shutdown (C)
Bill Erickson [Mon, 22 Jul 2013 20:44:26 +0000 (16:44 -0400)]
LP1204123 SIGTERM graceful shutdown (C)

When a TERM signal is received, the listener parent process will wait
for all child processes to complete any active tasks before killing the
child processes and shutting down.

Receiving a SIGINT or SIGQUIT results in a non-graceful shutdown.

In all cases, the system first un-registers with all routers.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
10 years agoLP1204123 SIGUSR1 causes router unregister (Perl/C)
Bill Erickson [Tue, 23 Jul 2013 14:40:09 +0000 (10:40 -0400)]
LP1204123 SIGUSR1 causes router unregister (Perl/C)

$ kill -s USR1 <listener_pid>

The listener process will unregister all router connections.  This
allows services to remove themselves from consideration for new
inbound requests while allowing their drone processes to complete
any currently running tasks.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
10 years agoLP1204123 SIGTERM causes graceful shutdown (Perl)
Bill Erickson [Fri, 21 Jun 2013 20:43:01 +0000 (16:43 -0400)]
LP1204123 SIGTERM causes graceful shutdown (Perl)

When sent the SIGTERM signal, listener processes will wait for all child
processes to complete their currently running tasks before killing all
child processes and exiting.

SIGQUIT and SIGINT can still be used for semi-graceful shutdowns, where
the listener de-registers and cleans up child processes, but does not
wait for child processes to finish their tasks.

To kill with fire, SIGKILL is still your friend.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
10 years agoLP1204123 Set SIGCHLD handler to DEFAULT for children (perl)
Bill Erickson [Wed, 26 Jun 2013 18:51:52 +0000 (14:51 -0400)]
LP1204123 Set SIGCHLD handler to DEFAULT for children (perl)

Remove the special SIGCHLD handler applied to the parent/listener
process from spawned child processes (drones) by setting child handler to
DEFAULT.  Otherwise, if an OpenSRF drone process spawns a sub-process,
the drone will execute the SIGCHLD handler meant for the Listener when
the sub-process dies, wherein hijinks ensue.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
10 years agosilence some uninitialized warnings
Jason Etheridge [Thu, 1 Aug 2013 18:15:14 +0000 (14:15 -0400)]
silence some uninitialized warnings

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
10 years agoLP#1188195: add tests for setting default client locale
Galen Charlton [Tue, 6 Aug 2013 22:00:15 +0000 (22:00 +0000)]
LP#1188195: add tests for setting default client locale

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1188195: Default per-process client locale (Perl)
Bill Erickson [Thu, 23 May 2013 19:17:12 +0000 (15:17 -0400)]
LP#1188195: Default per-process client locale (Perl)

Get/set the locale used by all new client sessions
for the current process.  This is primarily useful
for clients that wish to make a series of opensrf
calls and don't wish to set the locale for each new
AppSession object.

The caller should reset the locale when done using
reset_locale(), as the locale will otherwise persist
for the current process until set/reset again.

This is not for SERVER processes, since they
adopt the locale of their respective callers.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1208860: fix sprintf without format string.
Pasi Kallinen [Tue, 6 Aug 2013 13:56:06 +0000 (16:56 +0300)]
LP#1208860: fix sprintf without format string.

Fixes error preventing installation on Debian testing and
removes warning on earlier versions of Debian.

Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP1198983 disable multipart/mixed for Firefox
Bill Erickson [Thu, 11 Jul 2013 20:36:43 +0000 (16:36 -0400)]
LP1198983 disable multipart/mixed for Firefox

Only allow multipart mixed/replace message within the Evergreen staff
client for now.  Eventually, multi-part messages will be wholly
deprecated.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
11 years agoLP#1162907: don't require installing RPC::XML
Galen Charlton [Fri, 5 Apr 2013 03:01:49 +0000 (23:01 -0400)]
LP#1162907: don't require installing RPC::XML

RPC::XML is not required by OpenSRF, although it is an
Evergreen dependency.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
11 years agoMultisession blocking repair
Bill Erickson [Fri, 15 Mar 2013 19:56:55 +0000 (15:56 -0400)]
Multisession blocking repair

The new socket blocking code for multisession failed to take into
account that socket activity outside of the main block could lead to a
deadlock situation.  For example:

* Check status of request A -> not complete
* Check status of request B -> whatever
* Request A may now be complete, since checking the status of any request
  affects all requests
* Return to blocking loop because we think there is pending data, but in
  fact all data has already been pulled from the socket.

The solution is for session_reap() to make a sweep and check for changes
in requests that are now complete as a side-effect of checking for
completed requests.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>