[OPEN-ILS-DEV] PATCH: utils.c (performance of file_to_string())

2008-03-09 Thread Scott McKellar
This patch changes the file_to_string function to use fread() instead of fgets(). Since we're loading the entire file into memory, there's no reason to load it one line at a time. I compared both versions with a benchmark that loaded a 33 KB text file, taking care to minimize the effects of IO

Re: [OPEN-ILS-DEV] transport_session.c: use of $HOSTNAME

2008-03-09 Thread Bill Erickson
Scott McKellar wrote: Similar questions apply to two other cases where we look for $HOSTNAME: 1. osrfChatMkAuthKey(), in osrf_chat.c 2. osrfSystemBootstrapClientResc(), in osrf_system.c Scott McKellar http://home.swbell.net/mck9/ct/ --- Scott McKellar [EMAIL PROTECTED] wrote: In

Re: [OPEN-ILS-DEV] PATCH: jsonObjectFindPath

2008-03-09 Thread Mike Rylander
On Sun, Feb 17, 2008 at 8:01 PM, Scott McKellar [EMAIL PROTECTED] wrote: 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. Applied. [snip] - The use

Re: [OPEN-ILS-DEV] transport_session.c: use of $HOSTNAME

2008-03-09 Thread Scott McKellar
--- Mike Rylander [EMAIL PROTECTED] wrote: snip -- about using $HOSTNAME vs gethostname() Is there a need for these to match over time? If so, the environment may be safer, since the result of gethostname() may change from one call to the next, no? Suppose a program needs the host name

Re: [OPEN-ILS-DEV] PATCH: osrf_router.c (memory leak)

2008-03-09 Thread Mike Rylander
On Mon, Feb 18, 2008 at 2:48 AM, Scott McKellar [EMAIL PROTECTED] wrote: This patch plugs a memory leak that I somehow missed earlier, and adds a few performance tweaks. Applied. --miker 1. In osrfRouterFree() I added a line to free the osrfHash to which the classes member points. 2.

Re: [OPEN-ILS-DEV] PATCH: osrf_math.c (memory leak)

2008-03-09 Thread Mike Rylander
On Sat, Feb 23, 2008 at 1:24 PM, Scott McKellar [EMAIL PROTECTED] wrote: This patch plugs a memory leak. In osrfMathRun() we were leaking newParams. Applied. Scott McKellar http://home.swbell.net/mck9/ct/ Developer's Certificate of Origin 1.1 By making a contribution to this

Re: [OPEN-ILS-DEV] PATCH: json_xml.c (miscellaneous)

2008-03-09 Thread Mike Rylander
On Sun, Feb 24, 2008 at 12:12 AM, Scott McKellar [EMAIL PROTECTED] wrote: This patch is a minor cleanup. Applied. 1. The functions _rest_xml_output and _escape_xml are now static, and a couple of their parameters are now const. 2. In json_string_to_xml() we were leaking res_xml in the

Re: [OPEN-ILS-DEV] PATCH: oils_auth.c (memory leaks)

2008-03-09 Thread Mike Rylander
On Sun, Feb 24, 2008 at 1:43 AM, Scott McKellar [EMAIL PROTECTED] wrote: In oilsAuthGetTimeout() we make three calls to osrf_settings_host_value_object(), which allocates a jsonObject. However we were passing the return values directly to another function, without capturing the pointers for

Re: [OPEN-ILS-DEV] PATCH: osrfConfig.[ch] (const-correctness)

2008-03-09 Thread Mike Rylander
On Sun, Feb 24, 2008 at 1:40 PM, Scott McKellar [EMAIL PROTECTED] wrote: This patch adds the const qualifier to various parameters. Applied. 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: