]> git.evergreen-ils.org Git - OpenSRF.git/log
OpenSRF.git
15 years agoPatch from Scott McKellar:
miker [Fri, 5 Dec 2008 19:29:27 +0000 (19:29 +0000)]
Patch from Scott McKellar:

-- Adds a new macro buffer_length to return the n_used member of a
  growing buffer.

-- Changed buffer_chomp() to return the character removed instead of
  the new string length.

-- Removed the newly obsolete buffer_append_uescape function.

-- In utils.c: removed a commented-out version of the
  OSRF_BUFFER_ADD_CHAR macro, which has long resided in utils.h.

-- In the OSRF_BUFFER_ADD macro: replaced strcat() with strcpy(), as
  I had done earlier in the corresponding function buffer_add().

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

15 years agowlayton found a bad search and replace for ibex -> intrepid - thanks!
dbs [Thu, 4 Dec 2008 17:59:07 +0000 (17:59 +0000)]
wlayton found a bad search and replace for ibex -> intrepid - thanks!

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

15 years agoIt's so alluring to install packages instead of compiling from source, except when...
dbs [Thu, 4 Dec 2008 02:40:32 +0000 (02:40 +0000)]
It's so alluring to install packages instead of compiling from source, except when the packaged versions are broken in crucial ways. Argh.

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

15 years agoMerge patch from Scott McKellar for better Unicode handling
dbs [Sun, 30 Nov 2008 05:30:44 +0000 (05:30 +0000)]
Merge patch from Scott McKellar for better Unicode handling

The attached files contain a drop-in replacement for the
buffer_append_uescape function that I submitted a few days ago.  I regard
this new one as experimental, at least for now.

They also offer some byte-testing functions, and the equivalent macros,
that may be useful in other code that deals with UTF-8 strings.

The new function buffer_append_utf8() differs from buffer_append_uescape()
in the following ways:

1. It treats 0xF7 as a control character, which it is.

2. It is more finicky about recognizing the header byte of multibyte
characters.  For example 0xF6 is not a valid UTF-8 header byte.

3. When it sees a nul byte in the middle of a multibyte character, it
stops.  In the same situation, the older buffer_append_uescape() and
uescape() functions accumulate the nul byte into the hex codes they
build and then keep going, risking not only misbehavior but undefined
behavior.

4. When it finds invalid UTF-8 characters in the input string, it skips
over the invalid UTF-8 until it finds a valid character, and then
continues to translate the rest.  In other words it excises the garbage
and translates the rest intact.

---------

The file osrf_utf8.c includes an array of bitmasks that it uses to look
up the characteristics of each byte.  Not trusting myself to do that
much tedious typing by hand, I wrote a program to write the list of
bitmasks.  The macros are broadly similar to the standard C functions
isprint(), isalpha(), and so forth.

There is also a collection of functions, equivalent to the macros, with
the same names except using double underscores.  These may never find a
use, but they're there in case anyone ever needs a function pointer for
some reason.

The logic uses a finite state machine (FSM) to examine and dispatch each
byte in the input stream.  Because it needs to branch on the current
state as well as the type of each character, this logic is a little
slower than buffer_append_uescape().  However pretty much any
implementation of the same behavior would probably incur some such extra
overhead in some form.

-------------

(Regarding the second version of osrf_utf8.c):
When it encounters a code point too big to fit into 16 bits (after
stripping out the packaging bits), it formats it into a surrogate pair
of four hex digits each, rather than a single set of five or six hex
digits.

In addition, this new version no longer uses buffer_fadd() to format
hex values.

The code for constructing surrogate pairs is a slightly simplified version
of a code snippet found at:

   http://www.unicode.org/faq/utf_bom.html

The code snippet seems to come from a pretty authoritative source. and
my modifications were minimal, consisting mostly of collecting a couple
of constant expressions into constant values.

In the case of the G clef character (U+1D11E), I verified that my code
translates it to the correct surrogate pair ("\uD834\uDD1E").

Scott McKellar
http://home.swbell.net/mck9/ct/

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; and

(d) In the case of each of (a), (b), or (c), 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 indicated in the file.

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

15 years agoRefer to Intrepid, not Ibex (to be consistent with Gutsy and Hardy)
dbs [Sun, 30 Nov 2008 04:37:52 +0000 (04:37 +0000)]
Refer to Intrepid, not Ibex (to be consistent with Gutsy and Hardy)

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

15 years agoTwo patches from Scott McKellar:
erickson [Wed, 26 Nov 2008 17:56:42 +0000 (17:56 +0000)]
Two patches from Scott McKellar:

In some earlier patches I eliminated the old osrf_app_client_session_init
function in favor of its camel-case equivalent.  Unfortunately I didn't
notice that the new function now puts the old function's name into an
error message.  Here's the fix for that little oversight.

---

These patches replace a couple of deprecated identifiers with their
camel-case equivalents:

    osrf_message ==> osrfMessage
    string_array ==> osrfStringArray

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

15 years agoLet's remove one step from getting OpenSRF running out of the box;
dbs [Tue, 25 Nov 2008 17:48:31 +0000 (17:48 +0000)]
Let's remove one step from getting OpenSRF running out of the box;
give the persistence database a real default location

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

15 years agoContinue factoring out the Evergreen prerequisites from OpenSRF prereq installer
dbs [Tue, 25 Nov 2008 03:21:16 +0000 (03:21 +0000)]
Continue factoring out the Evergreen prerequisites from OpenSRF prereq installer

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

15 years agoCheap hack to enable OpenSRF to build on recent glibc systems
dbs [Tue, 25 Nov 2008 03:16:13 +0000 (03:16 +0000)]
Cheap hack to enable OpenSRF to build on recent glibc systems
(already in use in src/libopensrf/osrf_system.c)
Seems to stem from HOST_NAME_MAX moving from /usr/include/sys/param.h
to /usr/include/bits/local_lim.h

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

15 years agoMinor typo fix
dbs [Tue, 25 Nov 2008 02:47:31 +0000 (02:47 +0000)]
Minor typo fix

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

15 years agoMinor updates for prereq makefile
dbs [Sun, 23 Nov 2008 03:50:57 +0000 (03:50 +0000)]
Minor updates for prereq makefile

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

15 years agoin the interest of clearing some log cruft, move two highly repetitive messages from...
erickson [Thu, 20 Nov 2008 21:37:32 +0000 (21:37 +0000)]
in the interest of clearing some log cruft, move two highly repetitive messages from INFO to DEBUG level logging

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

15 years agoCorrect syntax for forcing Perl modules
dbs [Thu, 20 Nov 2008 01:40:29 +0000 (01:40 +0000)]
Correct syntax for forcing Perl modules

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

15 years agoForce Class::DBI install, as dependencies have started making test t/11 (triggers...
dbs [Thu, 20 Nov 2008 01:27:16 +0000 (01:27 +0000)]
Force Class::DBI install, as dependencies have started making test t/11 (triggers) fail;
We don't use trigger support in Class::DBI, so forcing the install should be okay.

Also, stop installing the syslog-ng package

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

15 years agoAdd notes about CPAN configuration, per wlayton's recommendation
dbs [Thu, 20 Nov 2008 00:37:14 +0000 (00:37 +0000)]
Add notes about CPAN configuration, per wlayton's recommendation

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

15 years ago2 Patches from Scott McKellar, with slight modification:
erickson [Tue, 18 Nov 2008 22:23:29 +0000 (22:23 +0000)]
2 Patches from Scott McKellar, with slight modification:

This patch adds a new function buffer_append_uescape(), a streamlined
replacement for uescape().  The optimizations are as follows:

1. As described in an earlier post, the new function appends the uescaped
text to an existing growing_buffer, rather than into an internal one that
it must create and destroy.  It thereby saves two mallocs and two frees.
In addition, the calling code doesn't have to do a buffer_add().

2. Because it doesn't create an internal growing_buffer, it doesn't need
to do a strlen() to determine how big a buffer to allocate.

3. Since the new version doesn't have a boolean parameter, it doesn't have
to test the boolean.

4. For characters < 128 (i.e. ASCII characters), I rearranged the order of
the tests so that non-control characters are recognized immediately.  In
uescape() we first go through a switch/case looking for several specific
control characters like '\b' and '\n'.  In practice most characters are
not control characters, so this rearrangement saves a few CPU cycles.

5. For control characters, uescape() uses buffer_fadd() to format the
character into hex.  Now, buffer_fadd is slow because it uses vsnprintf()
twice, once to determine a buffer size and once to do the formatting.  In
turn vsnprintf() is slow because it has to parse the format string.  In
this case we don't need vsnprintf() because we already know exactly how
big the buffer needs to be, and the formatting is simple.  I eliminated
buffer_fadd() and formatted the hex manually with a little bit-twiddling.

Some of these optimizations could be applied to uescape(), but I haven't
bothered, partly because I wanted a clean comparison for benchmarking
purposes and partly because I expect uescape() to disappear from use
(though I am leaving it available).

=====

This patch is a rewrite of the jsonObjectToJSON and jsonObjectToJSONRaw functions.  It is dependent on my previous patch to utils.c and utils.h,
adding the new buffer_append_uescape function.

One purpose is to replace a call to the uescape function with a call to
the faster buffer_append_uescape function.  The other purpose is to
introduce a faster way to translate a jsonObject into a string.

(Also in one spot I broke up a very long string literal into several
smaller pieces so that it wouldn't wrap around in the editor.)

In the existing jsonObjectToJSON function, we receive a pointer to a
jsonObject and return a string of JSON.  However we don't translate the
original jsonObject directly.  Instead, we create a modified clone of the
original, inserting an additional JSON_HASH node wherever we find a
classname.  Then we translate the clone, and finally destroy it.

It always struck me as an egregious waste to create and destroy a whole
parallel object just so that we could turn it into a string.  So I looked
for a way to eliminate the cloning.

The result is a modification of add_json_to_buffer(), a local function
that recursively traverses and translates the jsonObject.  When it sees a
classname (and it has been asked to expand classnames), the new version
inserts additional gibberish into the output text and then continues the
traversal, without modifying or copying the original jsonObject at all.

In my benchmark, this new approach was faster than the original by a
factor of about 5.  When I combined this change with the use of the new
buffer_append_uencode function, it was faster by a factor of about 7.2.
The benchmark used a moderately complex jsonObject about 5 or 6 levels
deep, with both hashes and arrays, with classnames at several levels.
The performance gain will no doubt depend on the contents of the
jsonObject,but I haven't tried to isolate the variables.

The new version is a bit trickier and harder to read than the old.  In my
opinion the speedup is worth the obscurity, because a lot of places in
Evergreen will benefit.

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

15 years agoPatch from Scott McKellar:
erickson [Mon, 17 Nov 2008 03:17:50 +0000 (03:17 +0000)]
Patch from Scott McKellar:

This patch is mostly a couple of tweaks to the growing_buffer code, loosely
related to my previous patch to utils.h.  There is also a small tweak to
uescape().

1. in buffer_add() I replaced strcat() with strcpy() for appending the new
string.  Since we already know where the end of the old string is, we don't
need to ask strcat() to find it for us.

2. In buffer_reset(), the old code contains the following:

osrf_clearbuf( gb->buf, sizeof(gb->buf) );

The evident intent is to clear the buffer.  However sizeof(gb->buf) is not
the size of the buffer, it's the size of the pointer to the buffer.  We
were clearing only the first four bytes or so.  I changed the line to:

osrf_clearbuf( gb->buf, gb->size );

3. Also in buffer_reset(), I added a line to populate the first byte of
the buffer with a nul, to ensure that the length of the (empty) string matches the n_used member.

4. In uescape(), we were examining the contents of string[] without first
verifying that string was not NULL.  The result would be undefined
behavior if string were ever NULL.  I added a couple of lines to treat
a NULL pointer as if it were a pointer to an empty string.

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

15 years agoPatch from Scott McKellar:
erickson [Mon, 17 Nov 2008 02:56:40 +0000 (02:56 +0000)]
Patch from Scott McKellar:

This patch fixes a bug in the OSRF_BUFFER_ADD_CHAR macro.

Like the corresponding buffer_add_char function, this macro appends a
specified character to a growing_buffer.  Unlike the function, however, the
existing version of the macro does not also append a terminal nul.

This bug had gone unnoticed because, most of the time, the rest of the
buffer is already filled with nuls, left over from the initial creation of
the growing_buffer.  I stumbled across the problem when, in the course of
writing a test harness for some other changes, I called buffer_reset()
in order to reuse an existing growing_buffer instead of destroying and
re-creating it.

With debugging turned on, buffer_reset() fills the buffer with exclamation
points, leaving a nul only in the very last byte.  Later, if we use
buffer_add() or buffer_fadd() to extend the string stored in the
growing_buffer, it uses strcat() to append the new characters.  The result
is a buffer overflow.

Actually buffer_reset() should place a nul in the first byte of the buffer.
Tomorrow I shall submit a patch to that effect.

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

15 years agoin trunk, go ahead and run the perl control script with verbose flag on
erickson [Tue, 11 Nov 2008 20:49:52 +0000 (20:49 +0000)]
in trunk, go ahead and run the perl control script with verbose flag on

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

15 years agodokuwiki-doc-stubber.pl is generated rather than modified in place
dbs [Wed, 5 Nov 2008 20:03:49 +0000 (20:03 +0000)]
dokuwiki-doc-stubber.pl is generated rather than modified in place

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

15 years agoReplace in-place modification with built files; enables one to re-run configure multi...
dbs [Tue, 4 Nov 2008 03:02:47 +0000 (03:02 +0000)]
Replace in-place modification with built files; enables one to re-run configure multiple times

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

15 years agoClean up the source tree a little more:
dbs [Mon, 27 Oct 2008 05:07:06 +0000 (05:07 +0000)]
Clean up the source tree a little more:
  * Delete setup.py.in (as we're not modifying it)
  * Make math_client.py be modified with SYSCONFDIR location per other scripts
    (although slightly longer term we'll need to stop modifying all of these
    in place, because that doesn't work after the first ./configure run)
  * Add a few files to automake's tracking so that make dist is a little happier

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

15 years agoFlesh out README with standalone install instructions
dbs [Mon, 27 Oct 2008 04:31:26 +0000 (04:31 +0000)]
Flesh out README with standalone install instructions

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

15 years agoAdd a prerequisite installer for OpenSRF (carved out of the Evergreen installer)
dbs [Mon, 27 Oct 2008 03:25:12 +0000 (03:25 +0000)]
Add a prerequisite installer for OpenSRF (carved out of the Evergreen installer)

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

15 years agoAdd a basic Python client example
dbs [Sat, 25 Oct 2008 17:29:19 +0000 (17:29 +0000)]
Add a basic Python client example

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

15 years agoFix build of OpenSRF Python support:
dbs [Sat, 25 Oct 2008 17:25:47 +0000 (17:25 +0000)]
Fix build of OpenSRF Python support:
we cannot use a fully-qualified pathname for packages and scripts vars

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

15 years agodisable the new internal logging of sent data by default.
erickson [Fri, 24 Oct 2008 16:36:06 +0000 (16:36 +0000)]
disable the new internal logging of sent data by default.

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

15 years agothe pool cleanup handler which was thought to only run on top-level child process...
erickson [Fri, 24 Oct 2008 16:31:07 +0000 (16:31 +0000)]
the pool cleanup handler which was thought to only run on top-level child process exit is running on cloned processes cleanup.  this is how mod_cgi runs scripts.  disabling cleanup for now.  note: this cleanup is new to 1.0

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

15 years agoLibraries are currently built as osrf_math.so and osrf_dbmath.so rather than lib*
dbs [Fri, 24 Oct 2008 15:37:35 +0000 (15:37 +0000)]
Libraries are currently built as osrf_math.so and osrf_dbmath.so rather than lib*

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

15 years agoopensrf.settings needs to be stateless for a stock install
dbs [Fri, 24 Oct 2008 15:07:33 +0000 (15:07 +0000)]
opensrf.settings needs to be stateless for a stock install

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

15 years agoDocument the canonical hostname determination method for Linux
dbs [Fri, 24 Oct 2008 14:42:20 +0000 (14:42 +0000)]
Document the canonical hostname determination method for Linux
(And fix a couple of annoying typos to boot)

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

15 years agoUse the standard memcached port in example config
dbs [Fri, 24 Oct 2008 14:25:52 +0000 (14:25 +0000)]
Use the standard memcached port in example config

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

15 years agoMinor typo (remove redundant "change this")
dbs [Fri, 24 Oct 2008 14:21:44 +0000 (14:21 +0000)]
Minor typo (remove redundant "change this")

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

15 years agoHey, we need to adjust the system's dynamic library path here
dbs [Sun, 19 Oct 2008 21:21:49 +0000 (21:21 +0000)]
Hey, we need to adjust the system's dynamic library path here

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

15 years agoCorrect configure options in install README
dbs [Sun, 19 Oct 2008 20:45:42 +0000 (20:45 +0000)]
Correct configure options in install README

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

15 years agoneed to copy automake files instead of linking
miker [Fri, 17 Oct 2008 16:44:46 +0000 (16:44 +0000)]
need to copy automake files instead of linking

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

15 years agoio::socket::inet, somewhere between version 1.29 and 1.31, requires the peerport...
erickson [Mon, 13 Oct 2008 20:44:50 +0000 (20:44 +0000)]
io::socket::inet, somewhere between version 1.29 and 1.31, requires the peerport to be explicitly cast to an int.  also updated error handling to use correct error var

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

15 years agoadded verbose option to print which services/pids are being stopped/started
erickson [Fri, 10 Oct 2008 22:16:36 +0000 (22:16 +0000)]
added verbose option to print which services/pids are being stopped/started

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

15 years agoMake the option help tell the truth
dbs [Tue, 7 Oct 2008 14:38:29 +0000 (14:38 +0000)]
Make the option help tell the truth

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

15 years agoDisable Python by default as it is not currently required
dbs [Tue, 7 Oct 2008 14:36:33 +0000 (14:36 +0000)]
Disable Python by default as it is not currently required

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

15 years agoMight as well point to the latest Makefile.install
dbs [Wed, 1 Oct 2008 03:02:16 +0000 (03:02 +0000)]
Might as well point to the latest Makefile.install

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

15 years agoPut a more real README in place
dbs [Wed, 1 Oct 2008 02:57:55 +0000 (02:57 +0000)]
Put a more real README in place

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

15 years agoCheck in a real file, not a link. Sheesh.
dbs [Wed, 1 Oct 2008 02:15:24 +0000 (02:15 +0000)]
Check in a real file, not a link. Sheesh.

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

15 years agoLet's check in the default INSTALL file to start with, and customize from there....
dbs [Wed, 1 Oct 2008 02:09:44 +0000 (02:09 +0000)]
Let's check in the default INSTALL file to start with, and customize from there. Lazy, lazy dbs.

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

15 years agoProvide more command line help for login in srfsh
dbs [Sun, 28 Sep 2008 03:59:44 +0000 (03:59 +0000)]
Provide more command line help for login in srfsh

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

15 years agoremoved a bunch of old, unused code. removed code that is now handled by the externa...
erickson [Thu, 25 Sep 2008 03:44:23 +0000 (03:44 +0000)]
removed a bunch of old, unused code.  removed code that is now handled by the external opensrf-perl.pl control process.  mild refacatoring otherwise.

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

15 years agouse the new process-specific perl control script
erickson [Thu, 25 Sep 2008 03:27:44 +0000 (03:27 +0000)]
use the new process-specific perl control script

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

15 years agomake sure service is not already running
erickson [Thu, 25 Sep 2008 03:13:23 +0000 (03:13 +0000)]
make sure service is not already running

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

15 years agochange from info to debug log
erickson [Thu, 25 Sep 2008 03:12:50 +0000 (03:12 +0000)]
change from info to debug log

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

15 years agoadded a configurable startup pause delay. after opensrf.settings has been started...
erickson [Thu, 25 Sep 2008 02:59:43 +0000 (02:59 +0000)]
added a configurable startup pause delay.  after opensrf.settings has been started (which will always be the first service to start), pause the top-level process for the configured amount of time before starting any more services

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

15 years agofixed bugs in start/stop_all
erickson [Wed, 24 Sep 2008 03:21:43 +0000 (03:21 +0000)]
fixed bugs in start/stop_all

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

15 years agoset log xid on outbound messages
erickson [Tue, 23 Sep 2008 16:57:44 +0000 (16:57 +0000)]
set log xid on outbound messages

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

15 years agomake sure we send the log xid in outbound messages
erickson [Mon, 22 Sep 2008 15:34:14 +0000 (15:34 +0000)]
make sure we send the log xid in outbound messages

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

15 years agoexpired cache data is a common occurrence. log at debug level, not warning
erickson [Mon, 22 Sep 2008 13:07:29 +0000 (13:07 +0000)]
expired cache data is a common occurrence.  log at debug level, not warning

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

15 years agosetting/clearing log XID. honoring client log xid if present
erickson [Fri, 19 Sep 2008 19:28:15 +0000 (19:28 +0000)]
setting/clearing log XID.  honoring client log xid if present

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

15 years agoadded a force set option on log XID to override it even we can act as an origin client
erickson [Fri, 19 Sep 2008 19:27:56 +0000 (19:27 +0000)]
added a force set option on log XID to override it even we can act as an origin client

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

15 years agotypo on header name
erickson [Fri, 19 Sep 2008 18:55:03 +0000 (18:55 +0000)]
typo on header name

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

15 years agousing single "=" in test for more general compliance
erickson [Wed, 17 Sep 2008 15:35:57 +0000 (15:35 +0000)]
using single "=" in test for more general compliance

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

15 years ago Typo - because typos in error messages just make me angry when I'm beating my head...
dbs [Mon, 15 Sep 2008 19:56:56 +0000 (19:56 +0000)]
 Typo - because typos in error messages just make me angry when I'm beating my head against a debugging problem

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

15 years agoremoved extra parens and unnecessary if test
erickson [Mon, 15 Sep 2008 19:33:48 +0000 (19:33 +0000)]
removed extra parens and unnecessary if test

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

15 years agoinitial steps toward OS X portage
sboyette [Mon, 15 Sep 2008 16:47:20 +0000 (16:47 +0000)]
initial steps toward OS X portage

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

15 years agoadded start all and stop all, changed some var names for clarity, needs testing
erickson [Mon, 15 Sep 2008 16:43:49 +0000 (16:43 +0000)]
added start all and stop all, changed some var names for clarity, needs testing

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

15 years agoconfig file, context, and cache server now have apache config settings. keeping...
erickson [Mon, 15 Sep 2008 16:42:59 +0000 (16:42 +0000)]
config file, context, and cache server now have apache config settings.  keeping a static version of the translator on hand to reduce a layer of malloc/free

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

15 years agoremoved misplaced "my"
erickson [Mon, 25 Aug 2008 20:05:39 +0000 (20:05 +0000)]
removed misplaced "my"

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

15 years agoadding explicit request timeout detection
miker [Fri, 22 Aug 2008 12:24:22 +0000 (12:24 +0000)]
adding explicit request timeout detection

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

15 years agoLog the locale for each request in the activity log
dbs [Wed, 20 Aug 2008 02:55:36 +0000 (02:55 +0000)]
Log the locale for each request in the activity log

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

15 years agocan has use tests for all modules
sboyette [Tue, 19 Aug 2008 18:07:33 +0000 (18:07 +0000)]
can has use tests for all modules

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

15 years agomissing deps found via testing
sboyette [Tue, 19 Aug 2008 18:07:16 +0000 (18:07 +0000)]
missing deps found via testing

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

15 years agotypo
sboyette [Tue, 19 Aug 2008 18:07:03 +0000 (18:07 +0000)]
typo

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

15 years agoOpenSRF::Util::JSON requires JSON::XS, not JSON
sboyette [Tue, 19 Aug 2008 17:04:31 +0000 (17:04 +0000)]
OpenSRF::Util::JSON requires JSON::XS, not JSON

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

15 years agomerging perl CPANification/normalization branch work
sboyette [Mon, 18 Aug 2008 19:14:00 +0000 (19:14 +0000)]
merging perl CPANification/normalization branch work

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

15 years agomerged in Shawn's build tools checker for autogen
erickson [Mon, 11 Aug 2008 20:07:53 +0000 (20:07 +0000)]
merged in Shawn's build tools checker for autogen

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

15 years agodoh ... use m instead of g
miker [Sun, 10 Aug 2008 03:57:11 +0000 (03:57 +0000)]
doh ... use m instead of g

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

15 years agoallow methods do decide on their strictness; properly parse params text signatures
miker [Sun, 10 Aug 2008 03:53:28 +0000 (03:53 +0000)]
allow methods do decide on their strictness; properly parse params text signatures

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

15 years agoRestore RPATH so that we do not need LD_LIBRARY_PATH messing with our environments
dbs [Thu, 7 Aug 2008 16:54:56 +0000 (16:54 +0000)]
Restore RPATH so that we do not need LD_LIBRARY_PATH messing with our environments

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

15 years agoApply patch from Kevin Beswick:
dbs [Wed, 6 Aug 2008 16:22:54 +0000 (16:22 +0000)]
Apply patch from Kevin Beswick:
"add the new opensrf-perl.pl script to the autotools build for OpenSRF"

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

15 years agoUse a slightly more robust scheme for setting OpenSRF locale in DojoSRF.
dbs [Wed, 6 Aug 2008 03:37:07 +0000 (03:37 +0000)]
Use a slightly more robust scheme for setting OpenSRF locale in DojoSRF.

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

15 years agowait for the parent proc to go away before we unlink the file
erickson [Mon, 4 Aug 2008 01:43:34 +0000 (01:43 +0000)]
wait for the parent proc to go away before we unlink the file

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

15 years agochecking browser agent to see if multipart is supported
erickson [Sun, 3 Aug 2008 23:45:57 +0000 (23:45 +0000)]
checking browser agent to see if multipart is supported

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

15 years agokill spawned processes at shutdown time
erickson [Fri, 1 Aug 2008 02:32:29 +0000 (02:32 +0000)]
kill spawned processes at shutdown time
set process name

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

15 years agoThis script provides per-service control of OpenSRF Perl processes. In other words...
erickson [Thu, 31 Jul 2008 13:36:00 +0000 (13:36 +0000)]
This script provides per-service control of OpenSRF Perl processes.  In other words, you can
stop/start/restart individual services.  Note that you can only stop services that have
been started with this script.

TODO
Add start_all, stop_all, and restart_all to manage all host-specific Perl services

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

15 years agosession passing for make_atomic, at least
miker [Tue, 29 Jul 2008 20:42:16 +0000 (20:42 +0000)]
session passing for make_atomic, at least

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

15 years agodoh ... not that way, nope
miker [Tue, 29 Jul 2008 20:00:19 +0000 (20:00 +0000)]
doh ... not that way, nope

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

15 years agogive subrequests access to the session (will not be used by respond())
miker [Tue, 29 Jul 2008 19:20:25 +0000 (19:20 +0000)]
give subrequests access to the session (will not be used by respond())

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

15 years agoGive Apache modules the support they need to work
dbs [Tue, 29 Jul 2008 13:17:03 +0000 (13:17 +0000)]
Give Apache modules the support they need to work
Push the apxs compile stage into the local install steps as it seems to require root privileges to write during build

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

15 years agoFix for installing gateway and translator (thanks to Kevin Beswick)
dbs [Mon, 28 Jul 2008 16:06:27 +0000 (16:06 +0000)]
Fix for installing gateway and translator (thanks to Kevin Beswick)

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

15 years agoThis patch removes the remaining autotools bits for objson, in particular giving
erickson [Mon, 28 Jul 2008 13:44:45 +0000 (13:44 +0000)]
This patch removes the remaining autotools bits for objson, in particular giving
the user the choice of whether to build legacy json.

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

15 years agoCommit autotools patch from Kevin Beswick
dbs [Mon, 28 Jul 2008 03:55:01 +0000 (03:55 +0000)]
Commit autotools patch from Kevin Beswick
(adjusted slightly for Bill's objson API compatibility layer removal)

Enclosed is a patch to update the OpenSRF autotools implementation. It
fixes most bugs such as:
-correctly replacing hardcoded directory paths in various files
-correctly implementing clean, and uninstall make targets
-fixes building src/c-apps modules without the lib prefix
-builds the src/gateway apache modules with apxs
-fixed the naming of the opensrf-c binary

Also, it implements more of the autotools features:
-rolling a tarball with make dist
-enables VPATH (parallel) builds
-checking a distribution with make distcheck

-------------------------------------------

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: [Kevin Beswick (kevinbeswick00@gmail.com)]
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1375 9efc2488-bf62-4759-914b-345cdb29e865

15 years agoremoving overly agressive locale normalization
miker [Sun, 27 Jul 2008 16:46:21 +0000 (16:46 +0000)]
removing overly agressive locale normalization

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

15 years ago* remove the objson API compat layer.
erickson [Sun, 27 Jul 2008 13:06:45 +0000 (13:06 +0000)]
* remove the objson API compat layer.

* Set the default JSON gateway protocol to non-legacy json

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

15 years agoremoving default config path so we don't have to mangle the C files at install time
erickson [Fri, 25 Jul 2008 15:30:11 +0000 (15:30 +0000)]
removing default config path so we don't have to mangle the C files at install time

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

15 years agono longer in use
erickson [Fri, 25 Jul 2008 02:21:54 +0000 (02:21 +0000)]
no longer in use

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

15 years agoremoved example log line comment
erickson [Fri, 25 Jul 2008 02:16:42 +0000 (02:16 +0000)]
removed example log line comment

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

15 years agoreturning server error on disconnected jabber socket
erickson [Thu, 24 Jul 2008 17:53:37 +0000 (17:53 +0000)]
returning server error on disconnected jabber socket

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

15 years agoCheap hack to enable kbeswick's cheap hack to get opensrf-c
dbs [Thu, 17 Jul 2008 19:43:42 +0000 (19:43 +0000)]
Cheap hack to enable kbeswick's cheap hack to get opensrf-c
automake probably gives us a better way to do this, but hyphens are pesky

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

15 years agoMerge the following patches from Kevin Beswick:
dbs [Thu, 17 Jul 2008 18:15:09 +0000 (18:15 +0000)]
Merge the following patches from Kevin Beswick:
  * fixed location to copy apachetools.h from ...
  * another typo...
  * fixed directory error in copying of header file.
  * move one more copy instruction for a header file.
  * create the perldir and jsdir
  * changed the place where headers are copied... fixed an error which caused them to be copied wrong.
  * fixed a capitalization typo issue in src/Makefile.am
  * updated opensrf.xml.example to use C math and dbmath implementation rather than Perl
  * fixed make distcheck problems -- builddir needed to be changed to srcdir
  * fixed directory replacement in .c file problem stopped the command added in the previous revision from running multiple times, fixed the location of the file to execute the command on.
  * changed where the directory replacement happens for osrf_json_gateway.c (it was after it was compiled rather than before)
  * corrected another error with installing header files ( can't install directories recursively through the 'prefix_PRIMARY = files' apparently)
  * went back to old way of copying perlmods and javascript. it will still be included in dist due to EXTRA_DIST in root makefile
  * fix install of src/javascript and src/perlmods
  * nobase_dist_lib_DATA defined twice... oops!
  * fixed problem with order of execution of targets (install-data-local was being executed before files were copied. resulted in an error)
  * fixed make dist, and changed ways that files are copied to their installed locations
  * fixed path substitution for the rest of the files with hardcoded paths to ensure correct default functionality of opensrf

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

15 years agocommented out the testing debug line
erickson [Wed, 9 Jul 2008 19:35:26 +0000 (19:35 +0000)]
commented out the testing debug line

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

15 years agoadding the http translator
erickson [Wed, 9 Jul 2008 19:18:51 +0000 (19:18 +0000)]
adding the http translator

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

15 years agoadded the string mangling to collapse a set of responses into 1 for non-multipart...
erickson [Wed, 9 Jul 2008 18:33:10 +0000 (18:33 +0000)]
added the string mangling to collapse a set of responses into 1 for non-multipart requests

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

15 years agoadded a buffer_chomp function to drop the last character from the buffer
erickson [Wed, 9 Jul 2008 18:32:37 +0000 (18:32 +0000)]
added a buffer_chomp function to drop the last character from the buffer

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