erickson [Fri, 23 May 2008 14:49:25 +0000 (14:49 +0000)]
moved stop/start actions out to functions
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1339
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Fri, 23 May 2008 02:04:10 +0000 (02:04 +0000)]
removing chatty debug log line
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1338
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Thu, 22 May 2008 19:58:56 +0000 (19:58 +0000)]
the latest cleanup broke GET requests by essentially ignoring them. fixed
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1337
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Tue, 20 May 2008 19:47:49 +0000 (19:47 +0000)]
updated some docs
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1336
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Tue, 20 May 2008 19:46:16 +0000 (19:46 +0000)]
added millisecond to the time output
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1335
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Tue, 20 May 2008 19:45:44 +0000 (19:45 +0000)]
added echo system method
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1334
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Tue, 20 May 2008 19:45:10 +0000 (19:45 +0000)]
defaulting to string for info message
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1333
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Tue, 20 May 2008 19:44:26 +0000 (19:44 +0000)]
now disconnecting and clearing network handles where appropriate, but not always both
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1332
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Tue, 20 May 2008 19:43:13 +0000 (19:43 +0000)]
added new disconnected exception. added some error condition logging. no longer disconnecting on network handle clear, because parent process may be using the handle.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1331
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Tue, 20 May 2008 19:41:55 +0000 (19:41 +0000)]
mild doc update, some changes from testing
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1330
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Mon, 19 May 2008 12:36:45 +0000 (12:36 +0000)]
testing svn email..
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1329
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Sun, 18 May 2008 23:42:17 +0000 (23:42 +0000)]
No longer globally setting the network recv_callback handler to None
because it clobbers the callbacks of other python clients running
in the same within the same process. Now we capture the existing
callback and replace it after the request has been processed
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1328
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Sun, 18 May 2008 22:17:59 +0000 (22:17 +0000)]
added date/time info when logging to a local file
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1327
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Sun, 18 May 2008 13:27:36 +0000 (13:27 +0000)]
Patch from Scott McKellar:
These patches eliminate two deprecated identifiers in favor of their
camel case equivalents:
osrf_app_client_session_init
osrf_app_session
All other instances of these identifiers have already been eliminated
from the code base.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1326
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Fri, 16 May 2008 13:17:17 +0000 (13:17 +0000)]
Patch from Scott McKellar:
This patch replaces some deprecated identifiers with their camelCase
equivalents.
osrf_app_session ==> osrfAppSession
osrf_message ==> osrfMessage
osrf_message_free ==> osrfMessageFree
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1325
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Fri, 16 May 2008 12:59:23 +0000 (12:59 +0000)]
exiting early when hash iterator returns null
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1324
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Fri, 16 May 2008 12:45:11 +0000 (12:45 +0000)]
Patch from Scott McKellar:
These patches provide a new and more efficient implementation of
osrfHash, using a hash table for random lookups and a doubly linked
list for iterations.
It is more efficient for two main reasons. First, for iterations
it doesn't maintain a separate copy of the keys, that then have to go
through the hashing algorithm. Second, when updating an existing
item, it updates it in place rather than deleting it and creating
a new one.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1323
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Thu, 15 May 2008 20:55:02 +0000 (20:55 +0000)]
Patch from Scott McKellar:
This patch tweaks a few things.
1. In json_parse_json_string() we declare a character array buff[],
fill it with nuls, and never refer to it again. I eliminated it.
2. A few lines below that, we use memset() to clear a three-character
buffer. I replaced the memset() with an initializer clause.
3. in json_handle_error() we were relying on the osrf_clearbuf macro
to add a terminal nul. However the plan is for this macro to become
a no-op someday. I added the nul manually.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1322
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Thu, 15 May 2008 20:46:15 +0000 (20:46 +0000)]
Patch from Scott McKellar:
This patch tweaks the jid_get_* functions, which copy various
fragments of an jabber id into a buffer supplied by the caller.
If these functions don't find the fragments they're looking for, they
now return an empty string in the buffer. Earlier they would leave
the buffer unchanged, leaving it to the calling code to initialize
the buffer.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1321
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Thu, 15 May 2008 13:36:32 +0000 (13:36 +0000)]
Patch from Scott McKellar:
This patch is mostly a performance tweak, but also tidies up a few
things.
In apacheParseParms() we load POST data and GET data into the same
buffer, with the GET data coming first. However the old code loads
the POST data first. If there is also some GET data, we juggle some
buffers in order to get the GET and POST data into the right order.
The new code loads the GET data first, and then appends the POST
data onto it. Besides being simpler, the new code avoids a layer
of copying, as well as and two round trips through malloc() and
free().
Other details:
1. I rearranged the declarations of the variables sarray, buffer,
key, and val, so as to narrow their scope. In the case of sarray
this rearrangement avoids a potential memory leak in the case of an
error exit (where the POST data is excessive).
2. I append a terminal null to the input buffer instead of using
memset() to fill the entire buffer.
3. Since the bread variable is a long rather than an int, I corrected
the format specifier accordingly in one of the debug messages.
4. I eliminated some redundant casts in a couple of calls to
ap_unescape(), since the variables so cast are already the right
types.
5. The final debug message was being issued only when sarray was
not NULL. However at this spot sarray cannot be NULL anyway, so I
eliminated the test of sarray.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1320
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Wed, 7 May 2008 17:26:26 +0000 (17:26 +0000)]
set the logging transaction ID earlier in the process
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1319
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Wed, 7 May 2008 17:26:08 +0000 (17:26 +0000)]
disable use of cjson for now because oddities have been seen in mod_python (potentially beyond).
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1318
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Wed, 7 May 2008 14:40:50 +0000 (14:40 +0000)]
checking socket connect state before sending final packet and calling shutdown (to prevent warnings)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1317
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Wed, 23 Apr 2008 00:17:25 +0000 (00:17 +0000)]
removing redundant file. covered by DojoSRF.js
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1316
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Mon, 21 Apr 2008 17:13:59 +0000 (17:13 +0000)]
importing json and md5 code
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1315
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Mon, 21 Apr 2008 01:03:09 +0000 (01:03 +0000)]
At long last, removing old objson sources. This will not affect the legacy
libobjson.so support, since that's all handled by libopensrf/osrf_legacy_json.c
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1314
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Thu, 17 Apr 2008 18:20:50 +0000 (18:20 +0000)]
better locale configuriation support
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1313
9efc2488-bf62-4759-914b-
345cdb29e865
dbs [Wed, 16 Apr 2008 01:37:05 +0000 (01:37 +0000)]
What was OpenSRF.js, is now DojoSRF.js - and there was much rejoicing from the Mac-heads
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1312
9efc2488-bf62-4759-914b-
345cdb29e865
dbs [Wed, 16 Apr 2008 01:36:24 +0000 (01:36 +0000)]
Prepare to rename this DojoSRF.js (avoiding code change and name change out of habit)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1311
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Sat, 12 Apr 2008 02:50:12 +0000 (02:50 +0000)]
Patch from Scott McKellar:
These patches add two new functions to the osrfHash routines, and
apply them in several modules. THe purpose is to eliminate the
access of an osrfHash's internals by the client code, so that the
internals can be replaced more readily.
Those internals haven't changed yet, but they will.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1310
9efc2488-bf62-4759-914b-
345cdb29e865
dbs [Fri, 11 Apr 2008 16:28:20 +0000 (16:28 +0000)]
Python is quickly becoming a requirement, not an option.
Let's set the default accordingly.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1309
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Fri, 11 Apr 2008 15:45:10 +0000 (15:45 +0000)]
Patch from Scott McKellar:
These patches use the new function osrfHashIteratorKey() to fetch
the current key from an osrfHashIterator, instead of accessing it
directly.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1308
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Fri, 11 Apr 2008 15:13:57 +0000 (15:13 +0000)]
Patch from Scott McKellar:
This patch adds a new function so that code outside of osrf_hash.c
doesn't have to directly access the "current" member of an
osrfHashIterator. This bit of encapsulation will make it easier
to refactor the osrfHash code.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1307
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Fri, 11 Apr 2008 14:58:49 +0000 (14:58 +0000)]
Applying diff from superceding patch provided by Scott McKellar
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1306
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Fri, 11 Apr 2008 14:42:31 +0000 (14:42 +0000)]
Patch from Scott McKellar:
This patch boosts the performance of an osrfHashIterator a bit, by
reusing the "current" buffer whenever possible instead of freeing and
reallocating it on every iteration.
I wrote a benchmark that repeatedly traverses a 27-item hash table.
The new version is about 10% faster. This improvement is not as
dramatic as I had hoped for, but it's easy to get, and it won't hurt.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1305
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Fri, 11 Apr 2008 14:13:49 +0000 (14:13 +0000)]
Patch from Scott McKellar:
These three patches are independent of each other, but they all do the
same thing.
In each case, we had been getting the local host name by reading the
environmental variable $HOSTNAME. This approach normally works, but
it is vulnerable to abuse or error by a user who modifies the value
of that variable, or even unsets it altogether.
With these patches we will instead call gethostname(), which is not
affected by changes in the environment.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1304
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Fri, 11 Apr 2008 14:03:27 +0000 (14:03 +0000)]
Patch from Scott McKellar (with commentary on future plans):
This patch applies the const qualifier to several variables, each of
them a copy of the "current" member of an osrfHashIterator.
**********************
While this patch is pretty inconsequential on its own, it is part of a
larger plan to streamline the use of osrfHashIterators.
The "current" member points to a dynamically allocated string. Every
time we advance the iterator, we free the string and allocate another
one to replace it.
My plan is to reuse the buffer whenever possible so as to reduce the
churning of memory through malloc() and free(). This approach will
require an additional member to keep track of the current capacity of
the buffer, rather like the "size" member of a growing_buffer.
It will also require that all code using osrfHashIterators treat the
"current" member as read-only. If somebody frees and replaces the
buffer outside of the proper interface, then buffer management will
get very confused.
I doubt that any code does anything so perfidious, but I'm going
through the files to make sure. Adding the const qualifier is an
easy way not only to verify that nothing bad is happening, but also
to make it less likely that something bad will happen in the future.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1303
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Fri, 11 Apr 2008 12:13:59 +0000 (12:13 +0000)]
Patch from Scott McKellar:
This patch elinminates the use of the osrf_clearbuf macro in several
spots. In each case, the buffer needs to be initialized to an empty
string, because the call to jid_get_* doesn't necessarily populate it
with anything else. In debugging mode, osrf_clearbuf() will fill the
field with exclamation points, which is not helpful in this context.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1302
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Wed, 9 Apr 2008 17:41:39 +0000 (17:41 +0000)]
dojo wrapper to opensrf JS libs
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1301
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Tue, 8 Apr 2008 13:38:43 +0000 (13:38 +0000)]
changing name to match name style; added comment to indicate this code is not usable yet
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1300
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Tue, 8 Apr 2008 13:35:23 +0000 (13:35 +0000)]
The functionality in these files (that isn't deprecated) has been replaced by opensrf.js
Leaving opensrf_jabber_transport.js in place for reference...
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1299
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Mon, 7 Apr 2008 21:11:41 +0000 (21:11 +0000)]
added support for log transaction IDs
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1298
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Mon, 7 Apr 2008 19:59:07 +0000 (19:59 +0000)]
raise an exception when the xmpp recipient is not found. http_translator turns this into a 404; srfsh prints a user error
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1297
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Mon, 31 Mar 2008 20:47:41 +0000 (20:47 +0000)]
This patch replaces the regex-based XML stream parsing mechanism with an XML::Parser (expat) based parser.
The API and parsing behavior should behave identically
This requires a new OpenSRF Perl dependency -> FreezeThaw
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1296
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Mon, 31 Mar 2008 20:35:20 +0000 (20:35 +0000)]
logging http result status
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1295
9efc2488-bf62-4759-914b-
345cdb29e865
dbs [Mon, 31 Mar 2008 00:24:34 +0000 (00:24 +0000)]
Another potentially annoying typo
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1294
9efc2488-bf62-4759-914b-
345cdb29e865
dbs [Mon, 31 Mar 2008 00:21:42 +0000 (00:21 +0000)]
This could have been a puzzling typo
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1293
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Sat, 29 Mar 2008 23:55:34 +0000 (23:55 +0000)]
implemented the majority of server-side python. still need to add settings server parsing and other stuff i have probably overlooked
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1292
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Mon, 24 Mar 2008 17:55:08 +0000 (17:55 +0000)]
added ontransporthander support for multipart requests
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1291
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Mon, 24 Mar 2008 17:34:44 +0000 (17:34 +0000)]
implemented onerror, onmethoderror and ontransporterror. moved the callbacks into the main stack for clearer processing
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1290
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Wed, 19 Mar 2008 17:13:48 +0000 (17:13 +0000)]
added some debug logging
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1289
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Wed, 19 Mar 2008 15:25:38 +0000 (15:25 +0000)]
added session/request locale support
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1288
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Wed, 19 Mar 2008 14:10:08 +0000 (14:10 +0000)]
updated to match new opensrf_core.xml domain layout
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1287
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Tue, 18 Mar 2008 17:52:43 +0000 (17:52 +0000)]
for easier debugging, logging method and params on NULL return
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1286
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Sun, 16 Mar 2008 18:18:27 +0000 (18:18 +0000)]
Plug for a a memory leak from Scott McKellar
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1285
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Wed, 12 Mar 2008 21:12:34 +0000 (21:12 +0000)]
updated srfsh math_bench return value since json no longer returns the extra 0s
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1284
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Wed, 12 Mar 2008 01:09:03 +0000 (01:09 +0000)]
Patch from Scott McKellar which removes harmful use of osrf_clearbuf()
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1283
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Tue, 11 Mar 2008 22:03:28 +0000 (22:03 +0000)]
forcing router exit without friendly cleanup for now until a socket bug is squashed
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1282
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Tue, 11 Mar 2008 16:49:41 +0000 (16:49 +0000)]
as it turns out, this was actually a problem with the makefile, not the utils.h macro def.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1281
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Tue, 11 Mar 2008 14:40:55 +0000 (14:40 +0000)]
rolling back change in changeset 1277 for default osrf_clearbuf handling. not sure of the exact problem yet, suffice to say the services wont start with the "!!!..." version of clearbuf enabled
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1280
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Mon, 10 Mar 2008 13:37:44 +0000 (13:37 +0000)]
Patch from Scott McKellar providing speed improvement by using fread() instead of fgets()
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1279
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Mon, 10 Mar 2008 13:32:28 +0000 (13:32 +0000)]
Patch from Scott McKellar:
1. Pedantic: I changed child_dead from an int to a sig_atomic_t, since
we set it from a signal handler.
2. In check_children() and prefork_child_wait(), we prepare an input
buffer for a read() by calling the osrf_clearbuf macro. Depending on
the existence of NDEBUG, this macro may or may not do the right thing.
If it does the wrong thing, it will pad the input data with
exclamation points, up to the maximimum length.
I added code to explicitly add a terminal nul, thus rendering
the osrf_clearbuf macro both harmless and superfluous.
This issue is the same one that I mentioned yesterday in connection
with socket_bundle.c, so I shall not belabor it here.
3. In addition: in check_children() I arranged to issue the debug
message only if the read is successful.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1278
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Mon, 10 Mar 2008 13:10:59 +0000 (13:10 +0000)]
Parially, a patch from Scott McKellar:
1. In socket_open_unix_server() and socket_open_unix_client(), I added
checks to make sure that the path parameter doesn't point to aomething
too big to fit into the receiving buffer of the struct sockaddr_un.
2. In _socket_handle_client_data() I add a terminal nul to the data
received by recv().
Also, reversing the semantics and default of NDEBUG per. To turn on debugging
code, set DEBUG to 1 durring the build:
$ DEBUG=1 make clean all
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1277
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Mon, 10 Mar 2008 12:04:57 +0000 (12:04 +0000)]
Patch from Scott McKellar:
This patch replaces several calls to fprintf() or printf() with calls
to fputs(), where we don't use conversion specifications.
Since fputs() doesn't have to parse the output text for conversions,
it should be marginally more efficient than fprintf() or printf().
More importantly: in one case the output text comes in part from an
input message, and may conceivably contain conversion specifications,
whether inadvertently or maliciously. In that case, fprintf() would
look for non-existent parameters to format into the output, resulting
in undefined behavior.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1276
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Mon, 10 Mar 2008 05:51:09 +0000 (05:51 +0000)]
Const correctness patch from Scott McKellar
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1275
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Mon, 10 Mar 2008 04:53:26 +0000 (04:53 +0000)]
Const correctness patch from Scott McKellar.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1274
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Mon, 10 Mar 2008 04:07:53 +0000 (04:07 +0000)]
small memory leak plugged by Scott McKellar in the math-bench test app
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1273
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Mon, 10 Mar 2008 03:53:04 +0000 (03:53 +0000)]
Patch from Scott McKellar:
This patch plugs a memory leak in osrfSystemBootstrapClientResc().
We were leaking log_file in the case of an early return.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1272
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Mon, 10 Mar 2008 03:02:07 +0000 (03:02 +0000)]
Patch from Scott McKellar:
This patch plugs a memory leak that I somehow missed earlier, and
adds a few performance tweaks.
1. In osrfRouterFree() I added a line to free the osrfHash to which
the classes member points.
2. I replaced an occurrence of "jsonParseString("[]")" with
"jsonNewObjectType(JSON_ARRAY)", a call that produces the same
result with a lot less overhead.
3. For similar reasons I replaced several occurrences of
"jsonParseString("{}")" with "jsonNewObjectType(JSON_HASH)".
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1271
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Mon, 10 Mar 2008 02:54:12 +0000 (02:54 +0000)]
Patch from Scott McKellar:
These patches mostly concern the jsonObjectFindPath function in
osrf_json_tools.c, along with a couple of related functions. They
plug some memory leaks and boost performance.
1. In osrf_json.h: I moved the nested #includes inside the compilation
guard.
2. In osrf_json_utils.h: I added a compilation guard.
3. I moved the declarations of _jsonObjectF_jsonObjectFindPathRecurse
and __jsonObjectF_jsonObjectFindPathRecurse out of the header and into
the implementation file, and made them both static.
4. I also renamed those functions to findMultiPath and
findMultiPathRecurse, respectively, so that their names wouldn't be
confusingly similar.
5. In both functions, and in the parent function jsonObjectFindPath(),
I added the const qualifier to the character pointer parameters.
6. In jsonObjectFindPath(): we were leaking pathcopy in the case of
an early return. Besides plugging that leak, I rearranged the logic
so that we don't allocate pathcopy unless we actually have a use for
it.
7. Also in jsonObjectFindPath(): I eliminated a call to strlen(), and
the redundant variable t.
8. In _jsonObjectFindPathRecurse() (now findMultiPath()) we were
leaking newarr in the case of an early return. Besides plugging that
leak, I rearranged the logic so that we don't allocate newarr unless
we actually have a use for it.
9. In a couple of spots I replaced "jsonParseString("[]")" with
"jsonNewObjectType(JSON_ARRAY)", a call that produces the same result
with a lot less overhead.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1270
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Mon, 10 Mar 2008 02:25:39 +0000 (02:25 +0000)]
Patch from Scott McKellar:
This patch plugs a memory leak and tweaks a couple of minor things.
1. In osrfCacheGetObject() I added the const qualifier to the "data"
variable, since we don't write through that pointer.
2. In osrfCacheGetString() I corrected an error message that claimed
to be coming from a different function.
3. In osrfCacheSetExpire() we were leaking a jsonObject allocated by
osrfCacheGetObject(). I contrived to free it.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1269
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Mon, 10 Mar 2008 02:21:03 +0000 (02:21 +0000)]
Patch from Scott McKellar:
In _jsonInsertParserItem() I changed a switch/case to an if/else,
eliminating a supposedly unreachable default branch that, if reached,
would leak memory.
With this change, a jsonObject that is neither a JSON_HASH nor a
JSON_ARRAY will be silently converted to a JSON_ARRAY by the call to
jsonObjectPush().
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1268
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Mon, 10 Mar 2008 01:14:03 +0000 (01:14 +0000)]
adding service name to the "stopping process.." log line
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1267
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Sun, 9 Mar 2008 01:16:48 +0000 (01:16 +0000)]
added special case to avoid wrapping boolean objects
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1266
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Sun, 9 Mar 2008 01:02:20 +0000 (01:02 +0000)]
add JSON::XS-based true/false support
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1265
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Fri, 7 Mar 2008 22:33:48 +0000 (22:33 +0000)]
made the pid file reading smarter. removed the nasty killalls since they are no longer necessary
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1264
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Fri, 7 Mar 2008 22:32:42 +0000 (22:32 +0000)]
added a basic signal handler for the top-level C process which sends SIGTERM to its children to clean up
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1263
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Thu, 6 Mar 2008 21:32:27 +0000 (21:32 +0000)]
added support for blocking connect and request calls
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1262
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Thu, 6 Mar 2008 21:32:11 +0000 (21:32 +0000)]
added connect-only handling
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1261
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Thu, 6 Mar 2008 20:22:01 +0000 (20:22 +0000)]
added connect/disconnect support, with onconnect callback
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1260
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Thu, 6 Mar 2008 19:32:07 +0000 (19:32 +0000)]
added support for ses.request(method, param1, param2, ...) style requests
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1259
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Thu, 6 Mar 2008 17:28:04 +0000 (17:28 +0000)]
added support for hash-encoded json objects
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1258
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Thu, 6 Mar 2008 17:22:21 +0000 (17:22 +0000)]
Updated OpenSRF Javascript client library. Currently, it only implements XMLHttpRequest as
a transport layer, and, thus far, only implements the multipart/x-mixed-replace (server push)
content type, which means only Mozilla browsers are support.
Non-multipart support will be added to support all other browsers in the future -- not much
code involved there.
Most of the existing OpenSRF JS files will be deprecated after the mozilla-based jabber
handling is imported into this new lib.
Currently, all you need is opensrf.js and opensrf_xhr.js to use the lib in xmlhttprequest mode
More work to do....
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1257
9efc2488-bf62-4759-914b-
345cdb29e865
dbs [Thu, 6 Mar 2008 04:10:35 +0000 (04:10 +0000)]
Remove <domains> element - breaks gateway.
Clean up whitespace, add modelines, and fix typo.
Bump version of opensrf.xml to 0.0.3
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1256
9efc2488-bf62-4759-914b-
345cdb29e865
dbs [Thu, 6 Mar 2008 03:02:59 +0000 (03:02 +0000)]
Overcome old setuptools' inability to convert FTP listings to URLs with
a direct URI for python-memcached
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1255
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Wed, 5 Mar 2008 23:14:41 +0000 (23:14 +0000)]
updated to match new config layout
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1254
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Wed, 5 Mar 2008 22:36:59 +0000 (22:36 +0000)]
Added support for multi-router registration
replaced unnecessary <domains><domain/></domains> with a single <domain> element in opensrf_core.xml
wrapped the top-level <router> element in a <routers> container element in opensrf_core.xml to
support additional router configuration
Updated the python, C, and Perl to match the above changes
Gave the router the ability to launch more than one router process, based on the config
Added a transport_error flag to C session to indicate a communcation error, which will prevent
client sessions from hanging when making bad requests
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1253
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Wed, 5 Mar 2008 14:30:12 +0000 (14:30 +0000)]
added a ":" to the getopt "c" option so it would take a param
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1252
9efc2488-bf62-4759-914b-
345cdb29e865
dbs [Mon, 3 Mar 2008 13:34:25 +0000 (13:34 +0000)]
Bail with a reasonable error message if OPT_CONFIG does not exist
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1251
9efc2488-bf62-4759-914b-
345cdb29e865
dbs [Mon, 3 Mar 2008 03:56:53 +0000 (03:56 +0000)]
Make the path to opensrf_core.xml argument optional, with a default
value based on the path used to invoke osrf_ctl.sh
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1250
9efc2488-bf62-4759-914b-
345cdb29e865
dbs [Sat, 16 Feb 2008 18:12:57 +0000 (18:12 +0000)]
x.y.z version numbering seems to make setuptools happier... okay
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1249
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Thu, 14 Feb 2008 00:15:39 +0000 (00:15 +0000)]
updated to fit new opensrf updates
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1248
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Mon, 11 Feb 2008 18:49:44 +0000 (18:49 +0000)]
makeing osrfSystemCacheInit() a "public" function. pushing osrfSystemCacheInit() into the child_init phase to prevent shared cache handles.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1247
9efc2488-bf62-4759-914b-
345cdb29e865
erickson [Thu, 7 Feb 2008 20:13:44 +0000 (20:13 +0000)]
gracefully handle a null server resposne
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1246
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Thu, 7 Feb 2008 18:58:50 +0000 (18:58 +0000)]
fix paging for large app introspection
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1245
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Thu, 31 Jan 2008 19:46:21 +0000 (19:46 +0000)]
Patch from Scott McKellar (including commentary):
1. I added the const qualifier to the second parameter of xmlSaxAttr().
2. I moved the prototype of _xmlToJSON() from the header to the
implementation file, and made the function static.
At least in its present form, _xmlToJSON should not be part of the
public interface because it is confusing. Sometimes it allocates a
new jsonObject, which needs to be freed, and sometimes it doesn't.
A better design would be for it to expect to receive a non-NULL pointer
to an existing jsonObject. Since it is called in only one place
(other than a couple of recursive calls), this would be an easy
change to make. However I left it alone -- as long as the function
is visible only from within its own source file, the potential for
confusion is limited.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1244
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Thu, 31 Jan 2008 19:39:02 +0000 (19:39 +0000)]
Patch from Scott McKellar:
1. I replaced the deprecated identifier osrf_message with osrfMessage,
except for the typedef defining the former.
2. In the header I commented out the prototypes for
osrf_message_set_request_info() and osrf_message_to_xml(), since these
functions are nowhere defined.
3. I made sure to initialize all members of a newly allocated
osrfMessage.
4. In osrf_message_deserialize(): I changed a series of ifs into a
series of else ifs, in order to avoid needless comparisons after one
comparison finds a match.
5. Also in osrf_message_deserialize(): I introduced a temporary
variable to cache the result of some calls to jsonObjectGetString(),
in order to avoid repeating the identical calls.
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1243
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Thu, 31 Jan 2008 19:32:04 +0000 (19:32 +0000)]
Patch from Scott McKellar to plug a memory leak in the mathbench test application
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1242
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Thu, 31 Jan 2008 19:31:07 +0000 (19:31 +0000)]
Patch from Scott McKellar to plug a memory leak in the mathbench test application
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1241
9efc2488-bf62-4759-914b-
345cdb29e865
miker [Thu, 31 Jan 2008 19:29:08 +0000 (19:29 +0000)]
Patch from Scott McKellar to replace some deprecated identifiers
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1240
9efc2488-bf62-4759-914b-
345cdb29e865