]> git.evergreen-ils.org Git - OpenSRF.git/log
OpenSRF.git
14 years agoupdating changelog and version stamp tags/rel_1_2_2
miker [Mon, 8 Feb 2010 21:21:02 +0000 (21:21 +0000)]
updating changelog and version stamp

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

14 years agoTagging 1.2.2 for release
miker [Mon, 8 Feb 2010 21:17:29 +0000 (21:17 +0000)]
Tagging 1.2.2 for release

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

14 years agoPrevent Internet Explorer from making multipart-mixed-replace calls as well
dbs [Wed, 3 Feb 2010 18:53:19 +0000 (18:53 +0000)]
Prevent Internet Explorer from making multipart-mixed-replace calls as well

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

14 years agoRevert part of r1908 - Apache won't load its opensrf modules without DEF_LDLIBS
dbs [Tue, 2 Feb 2010 17:08:55 +0000 (17:08 +0000)]
Revert part of r1908 - Apache won't load its opensrf modules without DEF_LDLIBS

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

14 years agoBackport r1906 from trunk: Provide a thread if the translator wasn't passed one in...
dbs [Fri, 29 Jan 2010 03:48:37 +0000 (03:48 +0000)]
Backport r1906 from trunk: Provide a thread if the translator wasn't passed one in the request headers

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

14 years agoBackport r1905 from trunk: Add an example Apache virtual host configuration and curl...
dbs [Fri, 29 Jan 2010 03:48:09 +0000 (03:48 +0000)]
Backport r1905 from trunk: Add an example Apache virtual host configuration and curl script for testing the math service

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

14 years agoBackport r1904 from trunk: Prevent WebKit?-based browsers (Chrome and Safari) from...
dbs [Fri, 29 Jan 2010 03:47:37 +0000 (03:47 +0000)]
Backport r1904 from trunk: Prevent WebKit?-based browsers (Chrome and Safari) from requesting multipart

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

14 years agoApply one more portability patch from Dan McMahill
dbs [Fri, 29 Jan 2010 02:51:11 +0000 (02:51 +0000)]
Apply one more portability patch from Dan McMahill

patch-ae -- $$(command) is ok with bash and ksh but is not portable to
            all /bin/sh implementations.  Also instead of hard coding
            "apxs2" use the APXS2 variable which was set during the
             configure process. This is especially helpful when the
             binary is installed as apxs instead of apxs2.

             Finally, remove the DEF_LDLIBS from the apxs2 compilation/link
             line.  As near as I can tell this only removed -lopensrf which
             is ok because we already had libopensrf.so explicitly listed.
             Including -lopensrf didn't work correctly since libopensrf
             had been built but not yet installed.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

Signed-off-by: Dan McMahill <dmcmahill@NetBSD.org>
git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_1_2@1908 9efc2488-bf62-4759-914b-345cdb29e865

14 years agoApply patches for enhancing portability, from Dan McMahill
dbs [Fri, 29 Jan 2010 02:48:00 +0000 (02:48 +0000)]
Apply patches for enhancing portability, from Dan McMahill

The following is a list of the patches and a brief description of what
they are supposed to address.  They were needed for building OpenSRF-1.2.0
(the most recent release) on a NetBSD system.

patch-aa -- some systems have dlerror() in libc instead of libdl so use
            AC_SEARCH_LIBS to see if we need an explicit -ldl or not.
            Fail in the same way as the previous code if we can't find
            dlerror() anywhere.

            malloc_stats() is malloc implementation specific so check for
            it and define HAVE_MALLOC_STATS if we do.

patch-ab -- No need to explicitly list -lxml2 -ldl -lmemcache  in LDADD.
            These were automatically filled in via the LIBS variable which
            is filled in via AC_SEARCH_LIBS and AC_CHECK_LIB.  Also this
            way -ldl only shows up if it is actually needed.

patch-ac -- Only conditionally call malloc_stats() if it exists.  On
            systems without malloc_stats(), just print a warning to the
            effect.

patch-ad -- Instead of using -lopensrf for foo_la_LIBADD use
            @top_builddir@/src/libopensrf/libopensrf.la.  This
            is the way to link to the not-yet-installed libtool
            library we just built.

patch-af -- "sed -i" is a GNU sed extension and not portable to Solaris or the
             various BSDs.  Rework the target a little to be more portable.

patch-ag -- Use /bin/sh instead of /bin/bash.  And to make sure this will work
            on non-Linux systems where /bin/sh is *not* bash, make things a little
            more portable.  The biggest is that
              function foo { code here }
            is replaced by the more portable
              foo() {code here}
            syntax.

patch-ah -- Use /bin/sh instead of /bin/bash.  And to make sure this will work
            on non-Linux systems where /bin/sh is *not* bash, make things a little
            more portable.  Of note, "echo -e" is non-portable so instead use
            as "here document" which is more portable and also I think easier to
            edit anyway.  Also address the function syntax and finally "==" is
            a bash extension to "test".  "=" does the same thing and is portable
            to other shells.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

Signed-off-by: Dan McMahill <dmcmahill@NetBSD.org>
git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_1_2@1907 9efc2488-bf62-4759-914b-345cdb29e865

14 years agoAdded some fault tolerance to the inbound-to-unixserver message handoff process....
erickson [Mon, 25 Jan 2010 16:29:58 +0000 (16:29 +0000)]
Added some fault tolerance to the inbound-to-unixserver message handoff process.  In some conditions, the unix socket will result in sigpipe (anecdotally, seen more oftenvirtualized environments).  these changes add a call to select before writing to the socket to check for socket availability and add a sigpipe handler that forces the inbound process to wait a brief period of time before trying the delivery again

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

14 years agoPrevent infinite loop (with logging) in child process reaping.
erickson [Wed, 2 Dec 2009 22:43:51 +0000 (22:43 +0000)]
Prevent infinite loop (with logging) in child process reaping.

From the perl docs on waitpid:

Note that on some systems, a return value of "-1" could mean that child processes are being automatically reaped.  See perlipc for details, and for other examples.

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

14 years agoMerge Bill Erickson's fixes (r1730, r1731) from trunk for recent versions of ejabberd
dbs [Fri, 20 Nov 2009 20:56:25 +0000 (20:56 +0000)]
Merge Bill Erickson's fixes (r1730, r1731) from trunk for recent versions of ejabberd

Set the 'from' address in outbound xmpp messages

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

14 years agoBackport Ubuntu Karmic prereq install target to 1.2 branch
dbs [Fri, 20 Nov 2009 20:46:51 +0000 (20:46 +0000)]
Backport Ubuntu Karmic prereq install target to 1.2 branch

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

14 years agoPatch from Jeroen van Meeuwen (Fedora Project) <kanarip@fedoraproject.org> to use...
dbs [Fri, 20 Nov 2009 15:45:49 +0000 (15:45 +0000)]
Patch from Jeroen van Meeuwen (Fedora Project) <kanarip@fedoraproject.org> to use $(APXS2)

Attached patch makes the auto foo respect the --with-apxs ./configure option for src/gateway/Makefile.am.

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

14 years agoBranch for the 1.2 release
dbs [Tue, 28 Jul 2009 13:31:35 +0000 (13:31 +0000)]
Branch for the 1.2 release

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

14 years agocheck NULL-ness on hash the key before calling find_item
erickson [Thu, 23 Jul 2009 02:03:38 +0000 (02:03 +0000)]
check NULL-ness on hash the key before calling find_item

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

14 years agoThis is a performance tweak to the osrfHashGet function, a widely
scottmk [Wed, 22 Jul 2009 03:50:13 +0000 (03:50 +0000)]
This is a performance tweak to the osrfHashGet function, a widely
used utility function.

The old version accepted a variable number of arguments: a pointer
to an osrfHash, a string optionally containing printf-style
format specifiers, and addtional parameters as needed to fill in
the blanks.

In practice, none of the code ever uses the printf-style formatting.
We always pass exactly two parameters.  We burn CPU cycles scanning
the string for format specifiers and never find any.

I eliminated the unused variable parameters and turned osrfHashGet()
into a simple two-parameter function.  Just in case anybody ever
wants it, I also cloned the original version into a new function
named osrfHashGetFmt, which accepts a variable number of arguments
as before.

Note that, since the signature of the function is changing,
it is necessary to recompile any open-ils programs that
call it, namely:

oils_dataloader.c
oils_event.c
oils_idl-core.c
oils_cstore.c
dump_idl.c

The Makefiles apparently don't recognize this dependency.

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

14 years agoAdd two new commands, "open" and "close", to open and close ongoing
scottmk [Fri, 10 Jul 2009 15:28:50 +0000 (15:28 +0000)]
Add two new commands, "open" and "close", to open and close ongoing
connections to specified services.  (Otherwise a connection is created
and destroyed for every request.)

Main purpose: to be able to use srfsh for database operations that require
transactions.

Warning: typically the <keepalive> value will need to be increased for
the service in question in opensrf.xml, or else the server will close
the connection before you can type your request.

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

14 years agoFix a bug whereby, if there was only one <service> entry for the
scottmk [Mon, 22 Jun 2009 05:28:34 +0000 (05:28 +0000)]
Fix a bug whereby, if there was only one <service> entry for the
public router in opensrf_core.xml, the service would fail to register.

Root cause: The code was expecting to see a list of services in a
JSON_ARRAY.  But if there's only one service, it's represented as a
JSON_STRING.

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

14 years agountil we make the router / C processes write their own PID file, put a short sleep...
erickson [Thu, 11 Jun 2009 13:10:36 +0000 (13:10 +0000)]
until we make the router / C processes write their own PID file, put a short sleep in after startup to give each time to show up in the 'ps' output.  this should help prevent lingering router processes after service stop

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

14 years agocall cleanup instead of running the death callback directory when server session...
erickson [Thu, 11 Jun 2009 12:49:43 +0000 (12:49 +0000)]
call cleanup instead of running the death callback directory when server session expires

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

14 years agoadded session callback support with example method. added method-not-found handling...
erickson [Thu, 11 Jun 2009 03:21:39 +0000 (03:21 +0000)]
added session callback support with example method.  added method-not-found handling.  added network socket flush for clearing stale inbound data.

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

14 years agoadded a session_data disctionary to ServerSession class for storing per-session data...
erickson [Wed, 10 Jun 2009 21:46:00 +0000 (21:46 +0000)]
added a session_data disctionary to ServerSession class for storing per-session data.  fixed bug where no params caused serer-side confusion.  added exmample of session_data usage to example app

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

14 years ago1. If an input line ends in a backslash, remove the backslash
scottmk [Sat, 6 Jun 2009 12:40:00 +0000 (12:40 +0000)]
1. If an input line ends in a backslash, remove the backslash
and append the following line as a continuation.

2. Disable the readline library's special treatment of
horizontal tabs, which by default trigger file name
completion (which is not useful for srfsh).

3. In calls to strtok(): accept horizontal tabs as
delimiters, since they are no longer suppressed
by readline().

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

14 years agoteach interval_to_seconds about HH:MM:SS format time intervals
miker [Thu, 4 Jun 2009 16:36:49 +0000 (16:36 +0000)]
teach interval_to_seconds about HH:MM:SS format time intervals

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

14 years agoteach interval_to_seconds about negative intervals
miker [Thu, 4 Jun 2009 16:33:43 +0000 (16:33 +0000)]
teach interval_to_seconds about negative intervals

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

14 years agoflush_socket now flushes data through the xml stream parser to prevent the destorying...
erickson [Wed, 3 Jun 2009 15:58:20 +0000 (15:58 +0000)]
flush_socket now flushes data through the xml stream parser to prevent the destorying the validity of the stream.  now discarding RESULT messages passed to server sessions.

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

14 years agodon't try to 'kill' an empty pid / prevents warnings
erickson [Wed, 3 Jun 2009 13:26:30 +0000 (13:26 +0000)]
don't try to 'kill' an empty pid / prevents warnings

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

14 years agodefine OSRF_HOSTNAME globally to prevent 'unbound variable' error
erickson [Mon, 1 Jun 2009 20:21:06 +0000 (20:21 +0000)]
define OSRF_HOSTNAME globally to prevent 'unbound variable' error

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

14 years agoUse autotools to set the default values in opensrf-perl.pl to what was passed in...
dbs [Sun, 31 May 2009 20:21:53 +0000 (20:21 +0000)]
Use autotools to set the default values in opensrf-perl.pl to what was passed in to ./configure

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

14 years agoUse autotools a bit more to our advantage:
dbs [Sun, 31 May 2009 19:49:00 +0000 (19:49 +0000)]
Use autotools a bit more to our advantage:
  * In osrf_ctl.sh, use the configured location for osrf_config by default
  * Differentiate between prefix and exec_prefix to respect configure options
  * Make configure output slightly more consistent

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

14 years agotry finding osrf_config in the users PATH first to prevent the use of 'find' when...
erickson [Fri, 29 May 2009 20:41:39 +0000 (20:41 +0000)]
try finding osrf_config in the users PATH first to prevent the use of 'find' when possible (find + NFS = watching paint dry)

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

14 years agoopensrf.py can now read the opensrf.settings file for managing apps. added start...
erickson [Fri, 22 May 2009 22:54:52 +0000 (22:54 +0000)]
opensrf.py can now read the opensrf.settings file for managing apps.  added start/stop_all actions.  support for service name syslog ident

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

14 years agountil full settings support is added, comment that out for now. added example keepalive
erickson [Tue, 19 May 2009 14:14:46 +0000 (14:14 +0000)]
until full settings support is added, comment that out for now.  added example keepalive

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

14 years agoadded final bits for stateful sessions (drone keepalive)
erickson [Tue, 19 May 2009 14:12:40 +0000 (14:12 +0000)]
added final bits for stateful sessions (drone keepalive)

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

14 years agono need to wrap each method description in an object container with class 'method'
erickson [Mon, 18 May 2009 13:50:13 +0000 (13:50 +0000)]
no need to wrap each method description in an object container with class 'method'

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

14 years agoactivate the config options, need to that if you're going to use a cache server that...
erickson [Thu, 30 Apr 2009 22:06:19 +0000 (22:06 +0000)]
activate the config options, need to that if you're going to use a cache server that's not == localhost:11211

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

14 years agogo ahead and log the cache keys when we log the cache data
erickson [Thu, 30 Apr 2009 21:36:10 +0000 (21:36 +0000)]
go ahead and log the cache keys when we log the cache data

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

14 years agodon't set stream state to disconnected on a non-stream error.
erickson [Tue, 28 Apr 2009 20:49:26 +0000 (20:49 +0000)]
don't set stream state to disconnected on a non-stream error.

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

14 years agopass unknown string as second param to osrfLog to avoid literal % parsing in vsnprintf
erickson [Mon, 27 Apr 2009 13:10:33 +0000 (13:10 +0000)]
pass unknown string as second param to osrfLog to avoid literal % parsing in vsnprintf

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

14 years agoPerformance tweak for osrfLog* functions: don't pass the message
scottmk [Mon, 27 Apr 2009 01:44:08 +0000 (01:44 +0000)]
Performance tweak for osrfLog* functions: don't pass the message
through VA_LIST_TO_STRING unless you're actually going to use it.

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

15 years agoOpenSRF r1692 + OpenILS r12809 broke the Evergreen build; this fixes it
dbs [Wed, 8 Apr 2009 02:48:02 +0000 (02:48 +0000)]
OpenSRF r1692 + OpenILS r12809 broke the Evergreen build; this fixes it

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

15 years agoNew JSON parser -- simpler, faster, and more robust in the
scottmk [Mon, 6 Apr 2009 13:22:00 +0000 (13:22 +0000)]
New JSON parser -- simpler, faster, and more robust in the
face of syntax errors

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

15 years agocapture osrfServerError responses
erickson [Thu, 2 Apr 2009 19:59:49 +0000 (19:59 +0000)]
capture osrfServerError responses

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

15 years agoIn osrfConfigGetValue(): plugged a memory leak
scottmk [Tue, 31 Mar 2009 18:34:48 +0000 (18:34 +0000)]
In osrfConfigGetValue(): plugged a memory leak
reported by Steven Chan.

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

15 years ago1. Create a new osrfListExtract function, which removes an item
scottmk [Tue, 31 Mar 2009 18:30:10 +0000 (18:30 +0000)]
1. Create a new osrfListExtract function, which removes an item
from an osrfList without destroying it, and returns a pointer to
the item thus removed.

2. Create a new jsonObjectExtractIndex, which removes a
specified entry in a JSON_ARRAY, and returns a pointer
to it, without destroying it.

3. In osrf_json.h: Corrected an inaccurate comment about
jsonObjectRemoveIndex().  Contrary to the original comment, this
function does not shift other objects down to fill the gap.

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

15 years agoIn osrf_system_shutdown(): provide a return value for an early
scottmk [Tue, 31 Mar 2009 12:45:53 +0000 (12:45 +0000)]
In osrf_system_shutdown(): provide a return value for an early
return (since the function is of type int).

It's not clear whether these are the right semantics, since we
never capture the return value anyway.  But if we're going
to return anything at all, it makes sense to return something
different in the case of an early return.

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

15 years agoPlug a memory leak reported by Steven Chan.
scottmk [Tue, 31 Mar 2009 02:08:48 +0000 (02:08 +0000)]
Plug a memory leak reported by Steven Chan.

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

15 years agohash keys have to be escaped like regular strings
erickson [Wed, 25 Mar 2009 22:35:45 +0000 (22:35 +0000)]
hash keys have to be escaped like regular strings

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

15 years agoPatch from John Craig fixing a problem with the pre-reqs makefile
miker [Thu, 19 Mar 2009 19:42:52 +0000 (19:42 +0000)]
Patch from John Craig fixing a problem with the pre-reqs makefile

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

15 years agomake OpenSRF 'global' so IE won't clobber it
erickson [Sat, 14 Mar 2009 17:42:32 +0000 (17:42 +0000)]
make OpenSRF 'global' so IE won't clobber it

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

15 years agotry the various xhr loading techniques
erickson [Fri, 6 Mar 2009 03:45:32 +0000 (03:45 +0000)]
try the various xhr loading techniques

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

15 years agoIE mad. IE throw tantrum. Bill give IE a Baby Ruth
erickson [Fri, 6 Mar 2009 03:32:13 +0000 (03:32 +0000)]
IE mad.  IE throw tantrum.  Bill give IE a Baby Ruth

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

15 years agoin IE, localeMatch might be null
erickson [Fri, 6 Mar 2009 02:31:45 +0000 (02:31 +0000)]
in IE, localeMatch might be null

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

15 years agodon't try to close the socket if it's not there
erickson [Sat, 28 Feb 2009 20:45:00 +0000 (20:45 +0000)]
don't try to close the socket if it's not there

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

15 years agoNon-Mozilla browsers want an explict dojo.declare() for a given namespace.
dbs [Mon, 23 Feb 2009 06:16:04 +0000 (06:16 +0000)]
Non-Mozilla browsers want an explict dojo.declare() for a given namespace.
Partially addresses http://svn.open-ils.org/trac/ILS/ticket/40

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

15 years agogotta protect the JSONObject2Perl() when decoding arrays as well
erickson [Tue, 17 Feb 2009 18:04:39 +0000 (18:04 +0000)]
gotta protect the JSONObject2Perl() when decoding arrays as well

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

15 years agonot sure why this is an issue now (different perl/json:xs verions?), but
erickson [Tue, 17 Feb 2009 17:47:18 +0000 (17:47 +0000)]
not sure why this is an issue now (different perl/json:xs verions?), but
$obj->{$k} = JSONObject2Perl($bool)
results in 'Modification of a read-only value attempted', while
$obj->{$k} = $bool
does not, even though the JSON::XS::Boolean object is not altered by JSONObject2Perl().
just missing something?
patched

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

15 years agoRemove old install target for CentOS - thanks Carl T. Miller!
dbs [Sun, 15 Feb 2009 16:08:58 +0000 (16:08 +0000)]
Remove old install target for CentOS - thanks Carl T. Miller!

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

15 years agoBug in CentOS prerequisite installer - thanks Carl T. Miller!
dbs [Sun, 15 Feb 2009 16:00:48 +0000 (16:00 +0000)]
Bug in CentOS prerequisite installer - thanks Carl T. Miller!

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

15 years ago1. Added a missing #include
scottmk [Thu, 12 Feb 2009 02:46:10 +0000 (02:46 +0000)]
1. Added a missing #include

2. In jsonNewIterator(): initialize hashItr to NULL
if the object is not a JSON_HASH

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

15 years agolet's avoid creating double-hyphened locales, too
dbs [Thu, 5 Feb 2009 23:24:59 +0000 (23:24 +0000)]
let's avoid creating double-hyphened locales, too

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

15 years agodojo.locale is the preferred method of determining Dojo's current locale; avoids...
dbs [Thu, 5 Feb 2009 23:21:57 +0000 (23:21 +0000)]
dojo.locale is the preferred method of determining Dojo's current locale; avoids having to explicitly set djConfig.locale

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

15 years agoSo, djfiander says "fix the code so it's not case-sensitive", so this seems to fix it.
dbs [Wed, 4 Feb 2009 03:55:56 +0000 (03:55 +0000)]
So, djfiander says "fix the code so it's not case-sensitive", so this seems to fix it.
OpenSRF locale gets xx-YY, even though Dojo locale is xx-yy.

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

15 years agoeplace the OSRF_METHOD_VERIFY_CONTEXT macro with an
scottmk [Mon, 2 Feb 2009 13:39:08 +0000 (13:39 +0000)]
eplace the OSRF_METHOD_VERIFY_CONTEXT macro with an
2 equivalent call to the osrfMethodVerifyContext function.

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

15 years agoReplace the OSRF_METHOD_VERIFY_CONTEXT macro with an
scottmk [Mon, 2 Feb 2009 13:32:57 +0000 (13:32 +0000)]
Replace the OSRF_METHOD_VERIFY_CONTEXT macro with an
2 equivalent call to the osrfMethodVerifyContext function.

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

15 years agoReplace the OSRF_METHOD_VERIFY_CONTEXT macro with an
scottmk [Mon, 2 Feb 2009 13:29:22 +0000 (13:29 +0000)]
Replace the OSRF_METHOD_VERIFY_CONTEXT macro with an
equivalent call to the osrfMethodVerifyContext function.

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

15 years agoThis update mainly tightens the error handling.
scottmk [Thu, 29 Jan 2009 03:58:26 +0000 (03:58 +0000)]
This update mainly tightens the error handling.

1. If there aren't enough arguments on the command line, return EXIT_FAILURE
instead of zero.

2. Defer the call to set_proc_title() until we are done using the command
line arguments, so that we don't have to make copies of them.

3. Check the return value from osrfConfigInit().  Otherwise a NULL (caused,
e.g., by a missing config file) leads to a segfault.

4. If the config file doesn't define any routers to spawn, exit immediately
with an error message before entering the fork loop.

5. If a child process returns (due to an error) instead of entering the
normal endless loop, break out of the fork loop.  Otherwise the child
remains in the fork loop and spawns children of its own (unless it's the
last child to be spawned).  At best, that's just silly.

6. Append an newline to a message issued from setupRouter().  (It's not
clear why this message goes directly to stderr instead of to the usual
logging machinery, which at this point is directed to stderr anyway.)

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

15 years agoadded what amounts to -l (use localhost as fqdn) support for correctly reporting...
erickson [Tue, 27 Jan 2009 17:38:30 +0000 (17:38 +0000)]
added what amounts to -l (use localhost as fqdn) support for correctly reporting status to the terminal

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

15 years agoDebian and Ubuntu both want libgrcypt11-dev explicitly specified
dbs [Tue, 27 Jan 2009 16:47:27 +0000 (16:47 +0000)]
Debian and Ubuntu both want libgrcypt11-dev explicitly specified

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

15 years agomake config parsing more tolerant
erickson [Sun, 25 Jan 2009 20:16:17 +0000 (20:16 +0000)]
make config parsing more tolerant

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

15 years agoforgot a noun
phasefx [Fri, 23 Jan 2009 21:40:26 +0000 (21:40 +0000)]
forgot a noun

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

15 years agosrfsh.xml tweaks
phasefx [Fri, 23 Jan 2009 21:36:56 +0000 (21:36 +0000)]
srfsh.xml tweaks

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

15 years agoquote-o
phasefx [Fri, 23 Jan 2009 21:04:35 +0000 (21:04 +0000)]
quote-o

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

15 years agorepaired config data structure ref check for registering routers
erickson [Tue, 20 Jan 2009 03:03:34 +0000 (03:03 +0000)]
repaired config data structure ref check for registering routers

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

15 years agoremoving perl special-casing from src/Makefile.am
sboyette [Mon, 19 Jan 2009 15:12:22 +0000 (15:12 +0000)]
removing perl special-casing from src/Makefile.am

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

15 years agoadding src/perl to AC_CONFIG_FILES
sboyette [Mon, 19 Jan 2009 15:11:39 +0000 (15:11 +0000)]
adding src/perl to AC_CONFIG_FILES

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

15 years agoinitial checkin for perl Makefile.am
sboyette [Mon, 19 Jan 2009 15:05:58 +0000 (15:05 +0000)]
initial checkin for perl Makefile.am

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

15 years agoAdd a new function osrfStringArrayTokenize. It parses an input
scottmk [Thu, 15 Jan 2009 02:05:24 +0000 (02:05 +0000)]
Add a new function osrfStringArrayTokenize.  It parses an input
string into tokens separated by a specified delimiter character,
much like strtok() or strtok_r(), and loads them into an
osrfStringArray.

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

15 years agoAdd a function osrfMethodVerifyContext() to do what the
scottmk [Wed, 14 Jan 2009 14:36:14 +0000 (14:36 +0000)]
Add a function osrfMethodVerifyContext() to do what the
existing OSRF_METHOD_VERIFY_CONTEXT macro does.  Use it in
_osrfAppRunSystemMethod() and osrfAppEcho().

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

15 years agolike the old gateway, log the full request params as JSON
erickson [Tue, 13 Jan 2009 23:17:28 +0000 (23:17 +0000)]
like the old gateway, log the full request params as JSON

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

15 years agoset the log xid before we read the POST data
erickson [Tue, 13 Jan 2009 22:58:12 +0000 (22:58 +0000)]
set the log xid before we read the POST data

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

15 years agoneed a copy of the service when it's pulled from the cache, since the sessionCache...
erickson [Tue, 13 Jan 2009 20:33:01 +0000 (20:33 +0000)]
need a copy of the service when it's pulled from the cache, since the sessionCache object is freed.  use apr_pstrdup so Apache will manage the memory for us

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

15 years agorolling back latest change because of macro variable oddities. this macro will event...
erickson [Tue, 13 Jan 2009 18:07:23 +0000 (18:07 +0000)]
rolling back latest change because of macro variable oddities.  this macro will eventually be replaced with a real function anyway

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

15 years agoReformed the macros OSRF_METHOD_VERIFY_CONTEXT and _OSRF_METHOD_VERIFY_CONTEXT.
scottmk [Mon, 12 Jan 2009 20:17:39 +0000 (20:17 +0000)]
Reformed the macros OSRF_METHOD_VERIFY_CONTEXT and _OSRF_METHOD_VERIFY_CONTEXT.

1. Renamed _OSRF_METHOD_VERIFY_CONTEXT to OSRF_METHOD_VERIFY_CONTEXT_
and the variable __j to _j, to avoid using reserved identifiers.

2. Applied the do/while(0) trick to accommodate multiple statements.

3. Avoid evaluating the macro arguments more than once.

4. Rearranged the white space for readability.

This update is a Band-aid.  These macros should turn into a proper function.

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

15 years ago1. Replaced the innards of an osrfStringArray to include an
scottmk [Mon, 12 Jan 2009 05:35:10 +0000 (05:35 +0000)]
1. Replaced the innards of an osrfStringArray to include an
osrfList instead of a pointer to an osrfList.  This change
eliminates a layer of malloc and free when creating and
destroying an osrfStringArray.  It also eliminates a layer
of indirection when performing other operations.

2. Eliminated the prototype for string_array_get_total_size(),
since no such function exists.

3. Added the const qualifier to various function parameters.

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

15 years agoIn the macro OSRF_LIST_GET_INDEX: placed all occurrences of the macro arguments
scottmk [Sun, 11 Jan 2009 22:11:34 +0000 (22:11 +0000)]
In the macro OSRF_LIST_GET_INDEX: placed all occurrences of the macro arguments
in parentheses, to prevent unexpected effects when one or more of the
arguments is an expression.

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

15 years agoBug fix. In some circumstances (unrecognized status code
scottmk [Fri, 9 Jan 2009 23:04:55 +0000 (23:04 +0000)]
Bug fix.  In some circumstances (unrecognized status code
from server) we were trying to free the same osrfMessage twice.

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

15 years agoMove the xmlSAXHandler out of the header and into the
scottmk [Fri, 9 Jan 2009 20:14:35 +0000 (20:14 +0000)]
Move the xmlSAXHandler out of the header and into the
implementation file, along with the prototypes of the
associated callback functions (which are now static)

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

15 years agoMove the xmlSAXHandler out of the header and into the
scottmk [Fri, 9 Jan 2009 18:51:01 +0000 (18:51 +0000)]
Move the xmlSAXHandler out of the header and into the
implementation file, along with the declarations of the
associated callback functions (which are now static)

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

15 years agoPrepare for #inclusion in C++
scottmk [Thu, 8 Jan 2009 22:37:32 +0000 (22:37 +0000)]
Prepare for #inclusion in C++

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

15 years agoPrepare for #inclusion in C++
scottmk [Thu, 8 Jan 2009 22:27:18 +0000 (22:27 +0000)]
Prepare for #inclusion in C++

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

15 years agoPrepare for #inclusion in C++
scottmk [Thu, 8 Jan 2009 22:18:16 +0000 (22:18 +0000)]
Prepare for #inclusion in C++

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

15 years agoPrepare for #inclusion in C++
scottmk [Thu, 8 Jan 2009 22:13:09 +0000 (22:13 +0000)]
Prepare for #inclusion in C++

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

15 years agoPrepare for #inclusion in C++
scottmk [Thu, 8 Jan 2009 22:06:19 +0000 (22:06 +0000)]
Prepare for #inclusion in C++

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

15 years agoPrepare for #inclusion in C++
scottmk [Thu, 8 Jan 2009 21:58:13 +0000 (21:58 +0000)]
Prepare for #inclusion in C++

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

15 years agoPrepare for #inclusion in C++
scottmk [Thu, 8 Jan 2009 21:51:50 +0000 (21:51 +0000)]
Prepare for #inclusion in C++

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

15 years agoPrepare for #inclusion in C++
scottmk [Thu, 8 Jan 2009 21:43:23 +0000 (21:43 +0000)]
Prepare for #inclusion in C++

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

15 years agoPrepare for #inclusion in C++
scottmk [Thu, 8 Jan 2009 21:34:17 +0000 (21:34 +0000)]
Prepare for #inclusion in C++

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

15 years agoPrepare for #inclusion in C++
scottmk [Thu, 8 Jan 2009 21:25:42 +0000 (21:25 +0000)]
Prepare for #inclusion in C++

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