OpenSRF.git
11 years ago1. Eliminated some memory leaks by replacing calls to
scottmk [Mon, 28 Sep 2009 16:03:33 +0000 (16:03 +0000)]
1. Eliminated some memory leaks by replacing calls to
jsonObjectFindPath() (whose return values weren't getting
freed) with calls to jsonObjectGetKey().  This change will
also speed up the configuration a bit by avoiding the
cloning of objects.

2. Changed setupRouter so that it returns void instead of int.
We weren't looking at the return value anyway.  Since the
function normally enters an infinite loop, any return
represents some kind of error.

3. If the configuration file has no transport information,
issue a message before exiting (to standard error, since we
don't have a log file yet).

4. Add doxygen-style comments for documentation.

M    src/router/osrf_router_main.c

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

11 years ago1. Changed osrfLogFacilityToInt() so that it accepts
scottmk [Mon, 28 Sep 2009 12:26:21 +0000 (12:26 +0000)]
1. Changed osrfLogFacilityToInt() so that it accepts
a const pointer.

2. Added the const qualifier to various variables.

3. In osrf_router_main.c: Removed three inappropriate
calls to free().  Some memory leaks remain, where we
fetch some cloned jsonObjects from jsonObjectFindPath()
and don't free them.

M    include/opensrf/log.h
M    src/router/osrf_router_main.c
M    src/gateway/osrf_http_translator.c
M    src/libopensrf/osrf_prefork.c
M    src/libopensrf/log.c
M    src/libopensrf/osrf_application.c

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

11 years agoAnd place headers in /prefix/include/opensrf/ again, fixing regression to /prefix...
dbs [Mon, 28 Sep 2009 04:38:16 +0000 (04:38 +0000)]
And place headers in /prefix/include/opensrf/ again, fixing regression to /prefix/include/

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

11 years agoW h i t e s p a c e matters when defining automake targets
dbs [Mon, 28 Sep 2009 04:18:27 +0000 (04:18 +0000)]
W h i t e s p a c e matters when defining automake targets

Headers weren't being installed as the include_HEADER target wasn't being parsed.

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

11 years ago1. Add doxygen markup for documentation.
scottmk [Fri, 25 Sep 2009 14:35:18 +0000 (14:35 +0000)]
1. Add doxygen markup for documentation.

2. In jsonNewObjectType(): explicitly initialize a JSON_BOOL to false, instead
of implicitly relying on the expectation that a NULL pointer is represented
by all-bits-zero.

3. In jsonObjectExtractIndex(): set the parent pointer to NULL in the
extracted jsonObject.

M    include/opensrf/osrf_json.h
M    src/libopensrf/osrf_json_object.c

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

11 years agoLogServer was removed from distro but not from MANIFEST - fixed
sboyette [Fri, 18 Sep 2009 12:57:58 +0000 (12:57 +0000)]
LogServer was removed from distro but not from MANIFEST - fixed

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

11 years agocorrect the test for modifying the *.xml.example files
phasefx [Thu, 17 Sep 2009 13:35:43 +0000 (13:35 +0000)]
correct the test for modifying the *.xml.example files

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

11 years agoPOD/docs cleanup
sboyette [Tue, 15 Sep 2009 16:39:33 +0000 (16:39 +0000)]
POD/docs cleanup

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

11 years ago100% test coverage
sboyette [Tue, 15 Sep 2009 16:19:48 +0000 (16:19 +0000)]
100% test coverage

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

11 years agoWIP
sboyette [Tue, 15 Sep 2009 16:19:47 +0000 (16:19 +0000)]
WIP

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

11 years agoWIP
sboyette [Tue, 15 Sep 2009 16:19:46 +0000 (16:19 +0000)]
WIP

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

11 years agomore test
sboyette [Tue, 15 Sep 2009 16:19:45 +0000 (16:19 +0000)]
more test

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

11 years agosync
sboyette [Tue, 15 Sep 2009 16:19:45 +0000 (16:19 +0000)]
sync

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

11 years agostowing WIP
sboyette [Tue, 15 Sep 2009 16:19:44 +0000 (16:19 +0000)]
stowing WIP

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

11 years agoWIP
sboyette [Tue, 15 Sep 2009 16:19:43 +0000 (16:19 +0000)]
WIP

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

11 years agoMake building & installing the core components of OpenSRF optional.
dbs [Mon, 14 Sep 2009 04:02:04 +0000 (04:02 +0000)]
Make building & installing the core components of OpenSRF optional.

For now, this will be of most interest to those interested in installing only
the JavaScript files from OpenSRF. If you disable the core components in
configure, then dependency checking for those core components is skipped and
the JavaScript files will be installed to the desired location.

For example:

./autogen.sh
./configure --prefix=/openils --sysconfdir=/openils/conf --disable-core
sudo make install

... will result in only the OpenSRF JavaScript files being installed in
/openils/lib/javascript/ (although at the moment, the other directories
will still be created).

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

11 years agoChanged the signature of osrfStringArrayGetString():
scottmk [Sun, 13 Sep 2009 03:04:04 +0000 (03:04 +0000)]
Changed the signature of osrfStringArrayGetString():

1. It receives a pointer to osrfStringArray.  That pointer
is now a pointer to const.

2. It returns a character pointer.  That pointer is now a
pointer to const.

I have already examined all existing calls to this function,
and modified them where necessary.

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

11 years agoIn osrf_json_gateway.c: added the const qualifier to three
scottmk [Sun, 13 Sep 2009 01:51:12 +0000 (01:51 +0000)]
In osrf_json_gateway.c: added the const qualifier to three
different local variables, all named "str".

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

11 years agoIn apacheGetParamValues() and apacheGetFirstParamValue():
scottmk [Sat, 12 Sep 2009 18:19:35 +0000 (18:19 +0000)]
In apacheGetParamValues() and apacheGetFirstParamValue():
applied const qualifier to nkey.

Also: changed the ensuing NULL tests to look at nkey
instead of key, since key has already been verified as
non-NULL.

Actually it looks like nkey is guaranteed to be non-NULL
as well, but that depends on the correct functioning
of osrfStringArray; so I left the NULL test, as
revised, in place.

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

11 years agoIn osrfAppSessionClientInit(): added a const
scottmk [Sat, 12 Sep 2009 17:59:39 +0000 (17:59 +0000)]
In osrfAppSessionClientInit(): added a const
qualifier to domain.

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

11 years agoIn osrfSystemBootstrap(): added a const qualifier
scottmk [Sat, 12 Sep 2009 17:53:39 +0000 (17:53 +0000)]
In osrfSystemBootstrap(): added a const qualifier
to appname.

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

11 years agoIn osrfBigHashFree: added a const qualifier to key,
scottmk [Sat, 12 Sep 2009 17:47:37 +0000 (17:47 +0000)]
In osrfBigHashFree: added a const qualifier to key,
and removed a pointless cast.

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

11 years agoIn osrfStringArrayRemove(): fixed a bug whereby we would decrement
scottmk [Sat, 12 Sep 2009 16:47:12 +0000 (16:47 +0000)]
In osrfStringArrayRemove(): fixed a bug whereby we would decrement
the size member even if no string was actually removed.

Added Doxygen-style comments to document everything.

Removed a few comments in the header so that they wouldn't
override comments in the implementation file.

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

11 years agoIn osrfNewHash(): specify a size for the osrfList used as a hash table,
scottmk [Fri, 11 Sep 2009 19:38:48 +0000 (19:38 +0000)]
In osrfNewHash(): specify a size for the osrfList used as a hash table,
so as to avoid wasting memory.

In osrfHashSet(): rearranged the logic a bit for clarity; no change in
behavior.

In osrfHashIteratorNext(): added a bit of protection against a corrupted
iterator.

Throughout: added Doxygen-style comments for documentation.  Removed
some comments from the header so that they wouldn't override more
complete comments from the implementation file.

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

11 years agoinitial support for capturing bytes read from gateway response
erickson [Thu, 10 Sep 2009 22:25:26 +0000 (22:25 +0000)]
initial support for capturing bytes read from gateway response

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

11 years agoUse working Perl syntax in example print hostname command.
dbs [Thu, 10 Sep 2009 01:09:03 +0000 (01:09 +0000)]
Use working Perl syntax in example print hostname command.

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

11 years agoAdd a linefeed to the Perl "print hostname" command
dbs [Thu, 10 Sep 2009 01:06:30 +0000 (01:06 +0000)]
Add a linefeed to the Perl "print hostname" command

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

11 years ago1. Moved the declaration of the osrf_host_config struct out of the header.
scottmk [Tue, 8 Sep 2009 20:46:23 +0000 (20:46 +0000)]
1. Moved the declaration of the osrf_host_config struct out of the header.
Nothing outside of osrf_settings.c needs access to any members of this
struct.

2. Made the osrf_settings_new_host_config function static; removed its
prototype from the header.

3. Made the "config" pointer static.

4. Rearranged osrf_settings_free_host_config a bit to protect against
attempts to free the cached config twice.

5. Finished adding doxygen-style markup comments.

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

11 years agoTweaking comments for doxygen:
scottmk [Tue, 8 Sep 2009 14:29:45 +0000 (14:29 +0000)]
Tweaking comments for doxygen:

Moved the overview from the implementation file to the header.

Deleted some comments from the header so that they wouldn't
override more complete comments from the implementation file.

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

11 years agoEnhanced the error messages from osrf_settings_host_value() and
scottmk [Fri, 4 Sep 2009 21:47:55 +0000 (21:47 +0000)]
Enhanced the error messages from osrf_settings_host_value() and
osrf_settings_host_value_object() to include the requested
search path.  That should make it easier to identify the caller
and thereby figure out what went wrong.

Also: added a couple of Doxygen-style comments.

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

11 years agofor consistency with other config files and ease of install automation, set the defau...
erickson [Fri, 4 Sep 2009 15:38:46 +0000 (15:38 +0000)]
for consistency with other config files and ease of install automation, set the default password to 'password'

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

11 years agoassume 'yes' to fetching dependencies; reduce the verbosity of package downloads
erickson [Fri, 4 Sep 2009 13:22:05 +0000 (13:22 +0000)]
assume 'yes' to fetching dependencies; reduce the verbosity of package downloads

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

11 years ago1. In osrfListSetDefault(): install the standard function
scottmk [Thu, 3 Sep 2009 20:00:49 +0000 (20:00 +0000)]
1. In osrfListSetDefault(): install the standard function
free() as the default item-freeing callback function,
instead of the gossamer-thin and useless wrapper for it,
osrfListVanillaFree().  This change eliminates a layer of
function call overhead.

2. Eliminate osrfListVanillaFree() as neither used nor useful.

3. Add doxygen-style comments to document every function.

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

11 years ago1. A minor streamlining of va_list_to_string(), to eliminate
scottmk [Thu, 3 Sep 2009 12:34:42 +0000 (12:34 +0000)]
1. A minor streamlining of va_list_to_string(), to eliminate
a layer of copying.

2. Corrected some faulty comments for doxygen.

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

11 years agorepaired partial change from 'class' to 'pkg'. added use strict/warnings
erickson [Mon, 31 Aug 2009 17:17:28 +0000 (17:17 +0000)]
repaired partial change from 'class' to 'pkg'.  added use strict/warnings

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

11 years ago1. Add comments to be recognized by doxygen or other such
scottmk [Mon, 31 Aug 2009 03:48:26 +0000 (03:48 +0000)]
1. Add comments to be recognized by doxygen or other such
documentation generators.

2. Change the values returned by buffer_fadd(), buffer_add(),
buffer_add_n(), and buffer_add_char() to make them more
consistent.  In practice we never pay any attention to the
return values anyway.

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

11 years agochanged 'my' globals to 'our' globals for testing purposes
sboyette [Fri, 28 Aug 2009 20:31:31 +0000 (20:31 +0000)]
changed 'my' globals to 'our' globals for testing purposes

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

11 years agofirst tests
sboyette [Fri, 28 Aug 2009 20:31:30 +0000 (20:31 +0000)]
first tests

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

11 years agomore cleanup and documentation in progress
sboyette [Fri, 28 Aug 2009 20:31:30 +0000 (20:31 +0000)]
more cleanup and documentation in progress

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

11 years agoyanking LogServer test file
sboyette [Fri, 28 Aug 2009 20:31:29 +0000 (20:31 +0000)]
yanking LogServer test file

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

11 years agoremoving use of LogServer
sboyette [Fri, 28 Aug 2009 20:31:28 +0000 (20:31 +0000)]
removing use of LogServer

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

11 years agoremoving _json_hint_to_class
sboyette [Fri, 28 Aug 2009 20:31:28 +0000 (20:31 +0000)]
removing _json_hint_to_class

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

11 years agoshuffling around, adding POD stubs
sboyette [Fri, 28 Aug 2009 20:31:27 +0000 (20:31 +0000)]
shuffling around, adding POD stubs

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

11 years agoremoving OSRF::Utils::LogServer at berick's suggestion
sboyette [Tue, 25 Aug 2009 18:51:00 +0000 (18:51 +0000)]
removing OSRF::Utils::LogServer at berick's suggestion

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

11 years agorearranging things a bit, docs. no actual code changes.
sboyette [Tue, 25 Aug 2009 18:51:00 +0000 (18:51 +0000)]
rearranging things a bit, docs. no actual code changes.

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

11 years agonew test files for Utils breakout
sboyette [Tue, 25 Aug 2009 15:45:01 +0000 (15:45 +0000)]
new test files for Utils breakout

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

11 years agoremoved $VERSION construct which caused undef warnings when not under svn, and only...
sboyette [Tue, 25 Aug 2009 15:45:01 +0000 (15:45 +0000)]
removed $VERSION construct which caused undef warnings when not under svn, and only occurred in 2 modules

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

11 years agomethod prettyJSON doesnt exist anymore
sboyette [Tue, 25 Aug 2009 15:04:43 +0000 (15:04 +0000)]
method prettyJSON doesnt exist anymore

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

11 years agoditto
sboyette [Tue, 25 Aug 2009 15:04:42 +0000 (15:04 +0000)]
ditto

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

11 years agothat last version change was rather poorly timed, as it turns out
sboyette [Tue, 25 Aug 2009 15:04:41 +0000 (15:04 +0000)]
that last version change was rather poorly timed, as it turns out

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

11 years agolocal doc updates for recent changes. wondering how much point there is in keeping...
sboyette [Fri, 21 Aug 2009 13:17:29 +0000 (13:17 +0000)]
local doc updates for recent changes. wondering how much point there is in keeping these around, long-term

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

11 years agopreƫmptive version bump
sboyette [Fri, 21 Aug 2009 13:17:28 +0000 (13:17 +0000)]
preĆ«mptive version bump

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

11 years ago'make check' works as promised. perl tests moved to 'check' target
sboyette [Fri, 21 Aug 2009 13:17:28 +0000 (13:17 +0000)]
'make check' works as promised. perl tests moved to 'check' target

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

11 years agoupdating MANIFEST for Module::Build-ness
sboyette [Thu, 20 Aug 2009 13:02:50 +0000 (13:02 +0000)]
updating MANIFEST for Module::Build-ness

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

11 years agoadded separate install fail diagnostic message
sboyette [Mon, 17 Aug 2009 00:34:51 +0000 (00:34 +0000)]
added separate install fail diagnostic message

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

11 years agoremoving files no longer needed
sboyette [Mon, 17 Aug 2009 00:34:51 +0000 (00:34 +0000)]
removing files no longer needed

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

11 years ago'make' will now just plain make again without proceeding to install.
sboyette [Mon, 17 Aug 2009 00:34:50 +0000 (00:34 +0000)]
'make' will now just plain make again without proceeding to install.
Added Build to files swept by 'make clean'

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

11 years agoGoing back to dumping a script (unbreaking non-root make vs. make install)
sboyette [Mon, 17 Aug 2009 00:34:50 +0000 (00:34 +0000)]
Going back to dumping a script (unbreaking non-root make vs. make install)

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

11 years agoAdded DISTCLEANFILES to make "make distclean" work better
sboyette [Thu, 13 Aug 2009 19:58:05 +0000 (19:58 +0000)]
Added DISTCLEANFILES to make "make distclean" work better

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

11 years agoAC_CONFIG_MACRO_DIR added at the behest of libtoolize
sboyette [Thu, 13 Aug 2009 19:58:04 +0000 (19:58 +0000)]
AC_CONFIG_MACRO_DIR added at the behest of libtoolize

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

11 years agoAdded distclean-local: target and DISTCLEANFILES to make 'make distclean' work supera...
sboyette [Thu, 13 Aug 2009 19:58:03 +0000 (19:58 +0000)]
Added distclean-local: target and DISTCLEANFILES to make 'make distclean' work superawesomely
Added ACLOCAL_AMFLAGS at the behest of libtoolize

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

11 years agoBuild.PL built; build/test/install all selfcontained and automatic now
sboyette [Thu, 13 Aug 2009 19:58:02 +0000 (19:58 +0000)]
Build.PL built; build/test/install all selfcontained and automatic now

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

11 years agoM::B changes
sboyette [Thu, 13 Aug 2009 19:58:02 +0000 (19:58 +0000)]
M::B changes

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

11 years agoM::B changes
sboyette [Thu, 13 Aug 2009 19:58:01 +0000 (19:58 +0000)]
M::B changes

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

11 years agoExtended the JSON_INIT_CLEAR macro to avoid segfaults.
scottmk [Wed, 5 Aug 2009 22:27:04 +0000 (22:27 +0000)]
Extended the JSON_INIT_CLEAR macro to avoid segfaults.

Scenario: converting a JSON_BOOL, with a value of true, to a JSON_HASH or
JSON_ARRAY.  The true value (in a union with an osrfHash* and an osrfList*)
was being interpreted as a non_NULL pointer and deferenced.  Oops.

With this change, we clear the boolean value (by nullifying one of the
unioned pointers) whenever changing from a JSON_BOOL to anything else.

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

11 years agoPerformance tweak to jsonIterator.
scottmk [Wed, 5 Aug 2009 12:53:19 +0000 (12:53 +0000)]
Performance tweak to jsonIterator.

Instead of storing a malloc'd copy of the key of a JSON_HASH entry,
just store a const pointer to the key string stored in the
internal osrfHash.  That way we don't have to do a malloc and
free every time we bump the iterator.

This change also requires the addition of a couple of const qualifiers
in the client code.

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

11 years agoset the 'from' address in outbound jabber messages
erickson [Wed, 29 Jul 2009 13:23:55 +0000 (13:23 +0000)]
set the 'from' address in outbound jabber messages

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

11 years agoset the 'from' address in outbound xmpp messages
erickson [Wed, 29 Jul 2009 12:53:49 +0000 (12:53 +0000)]
set the 'from' address in outbound xmpp messages

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

11 years agoreduce unnecessary calls to fcntl() while reading from the socket
erickson [Tue, 28 Jul 2009 20:27:42 +0000 (20:27 +0000)]
reduce unnecessary calls to fcntl() while reading from the socket

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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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