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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
scottmk [Thu, 8 Jan 2009 21:18:31 +0000 (21:18 +0000)]
Prepare for #inclusion in C++
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1602
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Thu, 8 Jan 2009 21:11:28 +0000 (21:11 +0000)]
Prepare for #inclusion in C++
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1601
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Thu, 8 Jan 2009 20:57:55 +0000 (20:57 +0000)]
Prepare for #inclusion in C++
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1600
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Thu, 8 Jan 2009 20:44:50 +0000 (20:44 +0000)]
Prepare for #inclusion in C++
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1599
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Thu, 8 Jan 2009 20:18:33 +0000 (20:18 +0000)]
Rename macro for compilation guard, to avoid conflict with
osrf_hash.h. Prepare for #inclusion in C++.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1598
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Thu, 8 Jan 2009 19:01:30 +0000 (19:01 +0000)]
Move nested headers into complation guard;
prepare for #inclusion in C++
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1597
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Thu, 8 Jan 2009 18:48:29 +0000 (18:48 +0000)]
Move nested headers into complation guard;
prepare for #inclusion in C++
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1596
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Thu, 8 Jan 2009 18:29:33 +0000 (18:29 +0000)]
Move nested headers into complation guard;
prepare for #inclusion in C++
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1595
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Thu, 8 Jan 2009 18:23:42 +0000 (18:23 +0000)]
Move nested headers into complation guard;
prepare for #inclusion in C++
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1594
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Thu, 8 Jan 2009 18:16:32 +0000 (18:16 +0000)]
Move nested headers into complation guard;
prepare for #inclusion in C++
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1593
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Thu, 8 Jan 2009 17:44:05 +0000 (17:44 +0000)]
Move nested headers into complation guard;
prepare for #inclusion in C++
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1592
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Thu, 8 Jan 2009 17:27:49 +0000 (17:27 +0000)]
Move nested headers into complation guard;
prepare for #inclusion in C++
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1591
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Thu, 8 Jan 2009 17:13:58 +0000 (17:13 +0000)]
Rename macro for compilation guard; prepare for #inclusion in C++
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1590
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Thu, 8 Jan 2009 16:56:16 +0000 (16:56 +0000)]
Rename macro for compilation guard; prepare for #inclusion in C++
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1589
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Thu, 8 Jan 2009 16:47:01 +0000 (16:47 +0000)]
Rename the macro for compilation guard; prepare for #inclusion in C++
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1588
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Thu, 8 Jan 2009 16:31:05 +0000 (16:31 +0000)]
Rename macro for compilation guard; prepare for #inclusion in C++
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1587
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Thu, 8 Jan 2009 16:18:01 +0000 (16:18 +0000)]
Rename macro for compilation guard; prepare for #inclusion in C++
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1586
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Thu, 8 Jan 2009 15:58:01 +0000 (15:58 +0000)]
Add compilation guard; prepare for #inclusion in C++
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1585
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Thu, 8 Jan 2009 15:50:56 +0000 (15:50 +0000)]
Add compilation guard; prepare for #inclusion in C++
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1584
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Thu, 8 Jan 2009 15:37:04 +0000 (15:37 +0000)]
Add compilation guard; prepare for #inclusion in C++
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1583
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Thu, 8 Jan 2009 15:28:32 +0000 (15:28 +0000)]
Add compilation guard; prepare for #inclusion in C++
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1582
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Thu, 8 Jan 2009 15:04:58 +0000 (15:04 +0000)]
Add compilation guard; prepare for #inclusion in C++
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1581
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Thu, 8 Jan 2009 14:50:18 +0000 (14:50 +0000)]
Add compilation guard; prepare for #inclusion in C++
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1580
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Thu, 8 Jan 2009 05:38:30 +0000 (05:38 +0000)]
Prepare for #inclusion in C++ programs
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1579
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Wed, 7 Jan 2009 18:28:53 +0000 (18:28 +0000)]
Rewrote the OSRF_MALLOC macro so that it evaluates each
of its arguments only once.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1578
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Wed, 7 Jan 2009 17:40:26 +0000 (17:40 +0000)]
Oops, missed one last instance of osrf_app_session_connect().
Replacing with osrfAppSessionConnect().
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1577
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Wed, 7 Jan 2009 17:34:01 +0000 (17:34 +0000)]
Eliminate the old obsolete function osrf_app_session_connect(), which has
now been completely replaced by the equivalent osrfAppSessionConnect().
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1576
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Wed, 7 Jan 2009 17:20:59 +0000 (17:20 +0000)]
Eliminated the obsolete function osrf_message_free(), which is now
completely replaced by the equivalent osrfMessageFree().
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1575
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Wed, 7 Jan 2009 16:27:06 +0000 (16:27 +0000)]
Eliminated four dead functions that are never called
except by each other:
json_parse_file()
jsonParseFile()
legacy_jsonParseFile()
file_to_string()
The files affected:
utils.h
utils.c
osrf_json.h
osrf_json_tools.c
osrf_legacy_json.h
osrf_legacy_json.c
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1574
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Tue, 6 Jan 2009 20:55:03 +0000 (20:55 +0000)]
1. Make the functions reset_session_buffers() and grab_incoming()
static, since no other source file references them by name.
2. Delete various fragments of dead, obsolete, commented-out code.
3. In init_transport: delete the cleanup code after failure
of previous calls to buffer_init(). It's unreachable, since
buffer_init() can never return NULL.
4. Change transport_session.c so that it uses buffer_add_n()
instead of passing data through an intermediate buffer.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1573
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Tue, 6 Jan 2009 16:01:41 +0000 (16:01 +0000)]
Tinkering with macros.
1. In OSRF_BUFFER_ADD, OSRF_BUFFER_ADD_CHAR, and OSRF_BUFFER_RESET:
eliminated multiple evaluations of macro arguments.
2. In OSRF_BUFFER_ADD: renamed local variable __tl to _tl, since
identifiers beginning with two underscores are reserved.
3. In OSRF_BUFFER_RESET: applied the do/while(0) trick so that the
macro will be work as intended when subject to an "if".
4. Added new macro OSRF_BUFFER_C_STR to return a const pointer to
the internal buffer of a growing_buffer. This new macro will enable
safe and direct access to the buffer contents without violating
encapsulation and without incurring a malloc and free.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1572
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Mon, 5 Jan 2009 17:50:15 +0000 (17:50 +0000)]
This update boosts the performance of the jsonFormatString function.
1. Replaced the old _tabs function, which required the construction and
destruction of a growing_buffer, with a new append_indentation function,
which adds white space to an existing growing_buffer. This change
eliminates a passel of mallocs and frees.
2. Removed the call to strlen() from the loop condition.
3. Replaced calls to buffer_fadd(), a fairly slow function, with calls
to OSRF_BUFFER_ADD_CHAR() and append_indentation(). Also: replaced a
call to buffer_add_char with the corresponding macro.
4. Eliminated a harmless but wasteful bug that sometimes added
indentation to the end of a line.
In my benchmarking, using a moderately complex JSON string 201
characters long, the new version was seven times as fast as the old.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1571
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Mon, 5 Jan 2009 17:36:42 +0000 (17:36 +0000)]
This update restructures the mechanism for queueing incoming transport
messages. In addition, the update to transport_client.c rearranges the
logic a bit in client_recv().
1. A transport_message now carries a pointer to be used in a linked list.
It is initialized to NULL when the message is created. We no longer use
a separately allocated list node to carry the message.
2. The queue of transport_messages no longer starts with a dummy node.
3. Instead of finding the tail of the queue by traversing the list from
the head, we maintain a separate pointer to the tail node. Thus the
enqueuing operation occurs in constant time instead of linear time.
4. In client_recv: we now have the dequeueing code in a single place,
instead of duplicating it.
5. In client_recv: I eliminated some conditional compilation that made
no real difference, since both branches of the #ifdef were effectively
identical.
6. In client_recv: changed both loops from while loops to do-while
loops, since in each case we want to perform at least one iteration.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1570
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Mon, 5 Jan 2009 17:05:45 +0000 (17:05 +0000)]
1. In osrf_stack_transport_handler(): removed the memset() as
pointless.
2. Also in osrf_stack_transport_handler(), in the loop traversing
arr[]: changed the loop condition from "i != num_msgs" to
"i < num_msgs", for hygienic reasons.
3. Eliminated osrf_stack_message_handler(). The first half of it moved
into its caller. The second half moved into the two callees
_do_client() and _do_server(). This refactoring made it easier to
eliminate a memory leak where _do_server() was failing to free the
input osrfMessage. I also eliminated a bug whereby we potentially
tried to access a member of a freed osrfMessage.
4. osrf_stack_application_handler() now returns void instead of int,
since we were ignoring the return value anyway.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1569
9efc2488-bf62-4759-914b-
345cdb29e865
scottmk [Mon, 5 Jan 2009 14:27:39 +0000 (14:27 +0000)]
Add a new function buffer_add_n(), and the corresponding
function-like macro OSRF_BUFFER_ADD_N.
These facilities append a specified number of characters from
an input string to a growing_buffer. They are intended for
situations where the length of the input string is already known,
or where the input string is not nul-terminated in the right
place.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1568
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Tue, 30 Dec 2008 19:22:07 +0000 (19:22 +0000)]
multidomain is required. no use for a static list of allowed services. removed support
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1567
9efc2488-bf62-4759-914b-
345cdb29e865
dbs [Mon, 22 Dec 2008 20:43:56 +0000 (20:43 +0000)]
Sync up README with rel_1_0 - cover multidomain configuration
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1565
9efc2488-bf62-4759-914b-
345cdb29e865
dbs [Mon, 22 Dec 2008 20:43:15 +0000 (20:43 +0000)]
Sync up the sample bootstrap conf from rel_1_0 - more explicit public vs. private
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1564
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Mon, 22 Dec 2008 20:27:27 +0000 (20:27 +0000)]
handle the case where only one service is registered for a given router
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1561
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Mon, 22 Dec 2008 19:13:45 +0000 (19:13 +0000)]
we neeed to keep router_name so that opensrf clients will know what router_name to use
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1559
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Mon, 22 Dec 2008 16:12:39 +0000 (16:12 +0000)]
running in no-router/single-service mode was checking a config value that is not required to exist. if we still want to support running in no-router mode, let's make it an explicit confuration option
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1557
9efc2488-bf62-4759-914b-
345cdb29e865
dbs [Sat, 20 Dec 2008 00:19:30 +0000 (00:19 +0000)]
Broader search'n'replace for LOCALSTATEDIR
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1552
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Fri, 19 Dec 2008 22:52:17 +0000 (22:52 +0000)]
updated to use multidomain by default
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1550
9efc2488-bf62-4759-914b-
345cdb29e865
dbs [Fri, 19 Dec 2008 22:19:50 +0000 (22:19 +0000)]
Update README to cover new Makefile.install targets, as well as optional
language support at ./configure time.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1548
9efc2488-bf62-4759-914b-
345cdb29e865
dbs [Fri, 19 Dec 2008 21:55:28 +0000 (21:55 +0000)]
libgcrypt-dev and libgdbm-dev are dependencies for XML::LibXSLT
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1546
9efc2488-bf62-4759-914b-
345cdb29e865
dbs [Fri, 19 Dec 2008 21:22:29 +0000 (21:22 +0000)]
Cover the developer case for bootstrapping the source
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1545
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Thu, 18 Dec 2008 21:22:23 +0000 (21:22 +0000)]
if we are only connecting, we are still connecting. same with disconnect
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1542
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Thu, 18 Dec 2008 20:49:09 +0000 (20:49 +0000)]
wrap the top case statement in brackets... i guess the macros are confusing things...
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1540
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Thu, 18 Dec 2008 20:17:57 +0000 (20:17 +0000)]
correctly capture the JID of the backend server process for the session cache. only create a session cache if there is a CONNECT message in the batch. be more aggressive about removing session caches
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1539
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Thu, 18 Dec 2008 18:51:14 +0000 (18:51 +0000)]
clear remote id on connec as well
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1537
9efc2488-bf62-4759-914b-
345cdb29e865
sboyette [Thu, 18 Dec 2008 16:56:32 +0000 (16:56 +0000)]
OpenSRF.pm version changes
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1536
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Thu, 18 Dec 2008 14:16:12 +0000 (14:16 +0000)]
clear remote ID on subsequent non-conntected requests and on disconnect
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1534
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Thu, 18 Dec 2008 04:15:35 +0000 (04:15 +0000)]
typo; this fix will precipitate a new release to support connected sessions through the translator
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1533
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Thu, 18 Dec 2008 03:21:02 +0000 (03:21 +0000)]
protect against "null" locale
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1531
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Thu, 18 Dec 2008 03:15:14 +0000 (03:15 +0000)]
force default locale on all messages
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1530
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Mon, 15 Dec 2008 21:42:50 +0000 (21:42 +0000)]
slight re-org of unknown client handling
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1529
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Mon, 15 Dec 2008 21:30:54 +0000 (21:30 +0000)]
protect against unknown clients, except when running in migratable mode
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1528
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Tue, 9 Dec 2008 00:46:52 +0000 (00:46 +0000)]
add support for encoding boolean types to JSON
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1526
9efc2488-bf62-4759-914b-
345cdb29e865
dbs [Sun, 7 Dec 2008 21:04:50 +0000 (21:04 +0000)]
Use an explicit shell (bash) to avoid complications on systems with different default shells
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1525
9efc2488-bf62-4759-914b-
345cdb29e865