[OPEN-ILS-DEV] PATCH: srfsh.c (treatment of login_session)

2007-07-22 Thread Scott McKellar
such an attempt would look like if it were there. Scott McKellar*** trunk/src/srfsh/srfsh.c 2007-07-22 08:32:35.0 -0500 --- trunk-mod/src/srfsh/srfsh.c 2007-07-22 09:15:40.0 -0500 *** *** 182,187 --- 182,188 write_history(history_file); free(request

Re: [OPEN-ILS-DEV] PATCH: srfsh.c (treatment of login_session)

2007-07-23 Thread Scott McKellar
call the underlying functions, and not just for Quebec. I don't think it would even be very hard to do. It would just complicate the code a little with an extra layer of indirection. The defaults would remain what they are today, so existing users wouldn't have to change anything. Scott

Re: [OPEN-ILS-DEV] PATCH: srfsh.c (treatment of login_session)

2007-07-24 Thread Scott McKellar
--- Mike Rylander [EMAIL PROTECTED] wrote: On 7/23/07, Scott McKellar [EMAIL PROTECTED] wrote: snip 3. If the user issues a command spelled 'login', call the xyz_login function in xyz.so. In this case the very commands themselves are defined at run time, and can do arbitrary

Re: [OPEN-ILS-DEV] Install 1.2 rc2, can not Finalize the OPAC

2007-07-31 Thread Scott McKellar
is that, one way or another, you used an example hostname from the instructions instead of substituting the hostname of the server you're actually using. Scott McKellar http://home.swbell.net/mck9/ct/ --- M Z [EMAIL PROTECTED] wrote: Hi, All I checked the osrfsys.log file when start Start OpenILS

[OPEN-ILS-DEV] PATCH: osrf_system.c (reporting names of child apps)

2007-09-02 Thread Scott McKellar
to this module, I developed the code on a stripped-down version of the original that I could test with, and then back-ported it to the original. I trust you will take it out for a spin before committing. Scott McKellar http://home.swbell.net/mck9/ct/ Developer's Certificate of Origin 1.1 By making

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

2007-09-22 Thread Scott McKellar
: How much wood would Woodchip chip, if Woodchip could chip wood? 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

[OPEN-ILS-DEV] PATCH: srfsh.c (const-correctness)

2007-09-22 Thread Scott McKellar
occur in two different places in the same function. I fixed them both the same way, with some differences in the details. 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

[OPEN-ILS-DEV] PATCH: osrf_json_tools.c (const-correctness)

2007-09-22 Thread Scott McKellar
replaced jsonObjectGetKey() with jsonObjectGetKeyConst(). 3. In one spot I captured the return value of jsonObjectGetIndex() with a const pointer instead of a non-const pointer. The second item above relies on the prior application of a previous pair of patches that I submitted earlier today. Scott

[OPEN-ILS-DEV] PATCH: osrf_message.c (const-correctness)

2007-09-23 Thread Scott McKellar
of jsonObjectGetKeyConst() requires the prior application of a previous pair of patches from yesterday. 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

Re: [OPEN-ILS-DEV] missing white space after macro

2007-09-27 Thread Scott McKellar
googled for jsarena.c and, at least in the first few pages of results, every reference was apparently to some file in Mozilla, unrelated to Evergreen. Is it possible that you somehow triggered an attempt to rebuild Firefox (or Netscape or something) from source? Scott McKellar http://home.swbell.net

Re: [OPEN-ILS-DEV] Re: PATCH: bzero is deprecated and unnecessary

2007-09-29 Thread Scott McKellar
be interested in migrating to safer functions like strlcpy and strlcat in the future? snip I'm not familiar with strlcpy or strlcat but I'll take a look. Scott McKellar http://home.swbell.net/mck9/ct/

Re: [OPEN-ILS-DEV] Re: PATCH: bzero is deprecated and unnecessary

2007-09-29 Thread Scott McKellar
important than whether we fix it. Scott McKellar http:/home.swbell.net/mck9/ct/

Re: [OPEN-ILS-DEV] Re: PATCH: bzero is deprecated and unnecessary

2007-09-30 Thread Scott McKellar
. Despite what the Standard says, not all snprintfs are created equal. In particular some of them treat the return code differently, and may vary in other ways for all I know. Scott McKellar http://home.swbell.net/mck9/ct/

Re: [OPEN-ILS-DEV] Re: PATCH: bzero is deprecated and unnecessary

2007-09-30 Thread Scott McKellar
there (or we could use calloc instead of malloc), at least for the time being. There may be a few other exceptions. Otherwise: hurray! Scott McKellar http://home.swbell.net/mck9/ct/

Re: [OPEN-ILS-DEV] Re: PATCH: bzero is deprecated and unnecessary

2007-09-30 Thread Scott McKellar
* on the temporary, it compiled and ran just fine. That'll teach me not to post untested code. (Well, actually, it probably won't.) It's worth a little extra trouble to make the macro safer. Scott McKellar

Re: [OPEN-ILS-DEV] Gender Question

2007-10-05 Thread Scott McKellar
are not likely to change our behavior any time soon. The Evergreen project doesn't seem to be particularly charged with testosterone, maybe because librarianship has long been a stronghold for women. Or maybe I'm too testosterone-crazed myself to notice. Scott McKellar http://home.swbell.net/mck9/ct

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

2007-10-21 Thread Scott McKellar
These patches sprinkle some const qualifiers over the parameters. Also: in osrf_settings_new_host_config() I set the config member explicitly to NULL, so as not to rely on the memset() call in safe_malloc(). Scott McKellar http://home.swbell.net/mck9/ct/ Developer's Certificate of Origin 1.1

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

2007-10-27 Thread Scott McKellar
underscores are reserved for the C implementation. 2. Likewise I removed a leading underscore from the name of the static function __osrfAppSetIntrospectMethod(). Scott McKellar http://home.swbell.net/mck9/ct/ Developer's Certificate of Origin 1.1 By making a contribution to this project, I

[OPEN-ILS-DEV] PATCH: osrf_version.c

2007-10-28 Thread Scott McKellar
relies on a previous patch to osrf_app_session.[ch], which hasn't been applied yet. --- Is there a good reason why the functions defined in osrf_version.c are not prototyped in any header? The policy appears to be to prototype them separately in every file that references them. Scott

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

2007-10-28 Thread Scott McKellar
. 5. In a couple of spots I replaced jsonObjectGetKey() with jsonObjectGetKeyConst(). 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

[OPEN-ILS-DEV] PATCH: osrf_math.c (const-correctness)

2007-10-28 Thread Scott McKellar
This patch applies the const qualifier to two internal pointer variables, of which each receives the return value from a call to jsonObjectGetIndex(). Thus we prepare for the day when jsonObjectGetIndex() returns a const pointer. Scott McKellar http://home.swbell.net/mck9/ct/ Developer's

[OPEN-ILS-DEV] PATCH: osrf_dbmath.c (const-correctness)

2007-10-28 Thread Scott McKellar
for osrf_math.c.) 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

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

2007-11-04 Thread Scott McKellar
This patch: 1. Adds the const qualifier to some parameters. 2. Eliminates a couple of unneeded intermediate variables. 3. When allocating a transport_message_node, sets the node member explicitly to NULL, to avoid relying on the memset() call in safe_malloc(). Scott McKellar http

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

2007-11-14 Thread Scott McKellar
--- Mike Rylander [EMAIL PROTECTED] wrote: On Nov 11, 2007 9:10 PM, Scott McKellar [EMAIL PROTECTED] wrote: These patches apply the const qualifier to several function parameters. In two cases, they also replace an empty parameter list with void. Scott, I've individually eyeballed

Re: [OPEN-ILS-DEV] oils_utils.h et alia

2007-11-14 Thread Scott McKellar
--- Bill Erickson [EMAIL PROTECTED] wrote: Mike Rylander wrote: On Nov 14, 2007 12:00 AM, Scott McKellar [EMAIL PROTECTED] wrote: Where is oils_utils.h supposed to reside? ...and where or what is the openils directory? In ils/trunk/ the only file by named oils_utils.h

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

2007-11-14 Thread Scott McKellar
been included in an update yet? Thanks for contributing to my education. Scott McKellar http://home.swbell.net/mck9/ct/

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

2007-11-17 Thread Scott McKellar
won't undo any recent patches. 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

[OPEN-ILS-DEV] PATCH: oils_requestor.c (const-correctness)

2007-11-18 Thread Scott McKellar
the result. 3. In a couple of places it replaces buffer_data() with buffer_release() in order to eliminate a round of malloc() and free(). Scott McKellar http://home.swbell.net/mck9/ct/ Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify

Re: [OPEN-ILS-DEV] Integrating automated code analysis tools into regular practice?

2007-11-21 Thread Scott McKellar
, because the reporting is rudimentary, automated, or both. I note that Coverity's website already publishes defect counts on the projects it covers. Scott McKellar http://home.swbell.net/mck9/ct/

[OPEN-ILS-DEV] Question about Evergreen database

2007-11-22 Thread Scott McKellar
over the last year? 2. What books, or other items, did Suzie Grimshaw check out in March of 2007? I am not asking so much about the existing tools, but about whether the database retains this kind of patron-level usage history in the first place. Scott McKellar http://home.swbell.net/mck9/ct/

Re: [OPEN-ILS-DEV] Question about Evergreen database

2007-11-23 Thread Scott McKellar
-correctness. Scott McKellar http://home.swbell.net/mck9/ct/ - Original Message - From: Brandon W. Uhlman [EMAIL PROTECTED] To: open-ils-dev@list.georgialibraries.org, Scott McKellar [EMAIL PROTECTED] Sent: Thursday, November 22, 2007 4:33:28 PM (GMT-0500) America/New_York Subject

[OPEN-ILS-DEV] PATCH: osrf_app_session.[ch] (misc. cleanup)

2007-11-23 Thread Scott McKellar
and session_locale members of osrfAppSession. 6. I added the const qualifier to a couple of parameters of osrfAppSessionStatus(). 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

Re: [OPEN-ILS-DEV] Integrating automated code analysis tools into regular practice?

2007-11-23 Thread Scott McKellar
) that the duplication occurs because of conditional compilation -- two similar blocks of code chosen through #ifdefs. Anyway I don't think we want to mess with jabberd code if we don't have to. Scott McKellar http://home.swbell.net/mck9/ct/

Re: [OPEN-ILS-DEV] Function naming conventions

2007-11-23 Thread Scott McKellar
is preferred to the lower_case_with_underscores version. Scott McKellar http://home.swbell.net/mck9/ct/ --- Bill Erickson [EMAIL PROTECTED] wrote: Scott McKellar wrote: In a number of cases I have found pairs of functions with similar names, where one is lower case with underscores (foo_bar

[OPEN-ILS-DEV] PATCH: oils_cstore.c (memory leaks and cleanup)

2007-12-01 Thread Scott McKellar
them without building a fully functional Evergreen installation, which would be more work than I want to buy into just now. So I trust you will apply at least some rudimentary tests before committing. Scott McKellar http://home.swbell.net/mck9/ct/ Developer's Certificate of Origin 1.1 By making

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

2007-12-02 Thread Scott McKellar
be a waste of time, because the operating system will take back the memory held by the process anyway upon exit. 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

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

2007-12-08 Thread Scott McKellar
--- Mike Rylander [EMAIL PROTECTED] wrote: While that's true, I believe that registered methods are not responsible (and shouldn't) free parts of the ctx object. AFAICT, Ooops, you're right of course. I wasn't thinking straight. Please disregard previous post. Scott McKellaer

[OPEN-ILS-DEV] PATCH: utils.c (faster buffer_add_char)

2007-12-09 Thread Scott McKellar
return. However it would be more consistent to return the original string length if the string to be appended is empty. Appending an empty string is not an error, it's just a special case. Scott McKellar http://home.swbell.net/mck9/ct/ Developer's Certificate of Origin 1.1 By making

[OPEN-ILS-DEV] PATCH: osrf_json_utils.h (scientific notation)

2007-12-11 Thread Scott McKellar
build. Admitted drawbacks: 1. Storing numbers as character strings would require us to allocate and free buffers, incurring additional overhead. 2. We may not want to take these measures until the legacy JSON code is gone, so that we wouldn't have to change things in both places. Scott McKellar

[OPEN-ILS-DEV] PATCH: osrf_json_tools.c (const-correctness)

2007-12-15 Thread Scott McKellar
These little patches apply the const qualifier to the argument of the jsonParseFile function. I'm not sure how this one escaped my previous patches. Scott McKellar http://home.swbell.net/mck9/ct/ Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify

[OPEN-ILS-DEV] PATCH: osrf_json_object.c (storing numbers as character strings)

2007-12-16 Thread Scott McKellar
the whole thing rather than a patch. Scott McKellar http://home.swbell.net/mck9/ct/*** ./trunk/include/opensrf/osrf_json.h 2007-12-15 07:58:20.0 -0600 --- ./trunk-mod/include/opensrf/osrf_json.h 2007-12-16 23:21:26.0 -0600 *** *** 297,302 --- 297,303

[OPEN-ILS-DEV] PATCH: srfsh.c (camel case)

2007-12-23 Thread Scott McKellar
== osrfAppSession osrf_system_get_transport_client == osrfSystemGetTransportClient 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

[OPEN-ILS-DEV] PATCH: osrf_settings.c (camel case)

2007-12-23 Thread Scott McKellar
== osrfAppSession 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

[OPEN-ILS-DEV] PATCH: osrf_json_gateway.c (camel case)

2007-12-23 Thread Scott McKellar
on my system because I don't have the Apache headers. However the changes are so mindless that they are not likely to hurt anything. Scott McKellar http://home.swbell.net/mck9/ct/ Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify

[OPEN-ILS-DEV] PATCH: osrf_app_session.c (camel case)

2007-12-23 Thread Scott McKellar
This patch merely shifts a name to its camel-case equivalent: osrf_system_get_transport_client == osrfSystemGetTransportClient Scott McKellar http://home.swbell.net/mck9/ Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution

[OPEN-ILS-DEV] PATCH: transport_message.[ch] (miscellaneous)

2007-12-24 Thread Scott McKellar
. --- Finally: a very merry Dies Natalis Solis Invicti to all. 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

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

2007-12-26 Thread Scott McKellar
This patch: 1. Plugs a memory leak in file_to_string(). If we failed to open the file, we were returning without freeing the growing_buffer that held the file name. 2. Replaces a couple of calls to buffer_data() with calls to buffer_release(). Scott McKellar http://home.swbell.net/mck9/ct

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

2007-12-29 Thread Scott McKellar
already cleared out the list of socket_nodes. But I was too lazy to do that. So I replaced the free() with a call to socket_manager_free(). At worst I may be wasting a few machine cycles, but we can be more confident that we are leaking neither socket_nodes nor sockets. Scott McKellar http

[OPEN-ILS-DEV] PATCH: osrf_list.[ch] (miscellaneous)

2007-12-30 Thread Scott McKellar
pointer, they are included in the count. I left this function alone, because I didn't know whether to fix the function or the comment. 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

[OPEN-ILS-DEV] PATCH: osrf_hash.[ch] (tidying up)

2007-12-30 Thread Scott McKellar
static) 2. Remove a leading underscore from each of the struct tags __osrfHashStruct and __osrfHashIteratorStruct; 3. Explicitly initialize all struct members. Scott McKellar http://home.swbell.net/mck9/ct/ Developer's Certificate of Origin 1.1 By making a contribution to this project, I

Re: [OPEN-ILS-DEV] PATCH: osrf_list.[ch] (miscellaneous)

2007-12-31 Thread Scott McKellar
--- Mike Rylander [EMAIL PROTECTED] wrote: On Dec 30, 2007 1:14 PM, Scott McKellar [EMAIL PROTECTED] wrote: These patches tidy up various things. 1. I moved the macros OSRF_LIST_DEFAULT_SIZE and OSRF_LIST_INC_SIZE from the header into the implementation file. No other source files

Re: [OPEN-ILS-DEV] PATCH: transport_message.[ch] (miscellaneous)

2008-01-01 Thread Scott McKellar
. A graceful abort is probably about as much as we could hope for. Under Linux we probably can't even do that much, because so far as I know, we can't detect the memory exhaustion except by crashing. Scott McKellar

[OPEN-ILS-DEV] PATCH: osrf_app_session osrf_system (camel case)

2008-01-01 Thread Scott McKellar
osrf_system_bootstrap_client_resc So far as I know, the only remaining redundant identifier is osrf_app_session, which occurs in 19 different files. 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

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

2008-01-01 Thread Scott McKellar
This leak plugs a memory leak. In handle_request() we allocate a growing_buffer and pass the pointer to send_request(). However we weren't freeing the growing_buffer after the return from send_request(). Scott McKellar http://home.swbell.net/mck9/ct/ Developer's Certificate of Origin 1.1

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

2008-01-01 Thread Scott McKellar
a_l tout As I have noted before, this file doesn't compile on my system because I haven't installed the Apache headers. So the patch may require closer attention than usual. Scott McKellar http://home.swbelll.net/mck9/ct/ Developer's Certificate of Origin 1.1 By making a contribution

[OPEN-ILS-DEV] PATCH: osrf_prefork.[ch] (miscellaneous)

2008-01-06 Thread Scott McKellar
would involve more untangling than I'm up for at the moment. 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

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

2008-01-07 Thread Scott McKellar
This patch plugs a variety of miscellaneous memory leaks, most of them in connection with early exits. I won't list them here because you can readily verify them yourself (and should). Scott McKellar http://home.swbell.net/mck9/ct/ Developer's Certificate of Origin 1.1 By making a contribution

[OPEN-ILS-DEV] PATCH: oils_event.[ch] (miscellaneous)

2008-01-12 Thread Scott McKellar
(), with enough parameters to cover all the members. A possible disadvantage of this approach is that if you add a new member you have to modify every call to oilsNewEvent(), even where the new member isn't used. I don't know how likely that is. Scott McKellar http://home.swbell.net/mck9/ct/ Developer's

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

2008-01-12 Thread Scott McKellar
the idea of returning negative numbers from main() because I don't know what happens to them. Traditional UNIX recognizes return values from 0 to 255. However I left these negative values alone because there may be shell scripts or something that capture them. Scott McKellar http

[OPEN-ILS-DEV] Dubious code in mod_xmlbuilder.c

2008-01-12 Thread Scott McKellar
is that the test for a NULL from strdup() was intended conceptually to test for a NULL return from xmlSaxAttr(), but it just wasn't written right. However I don't understand the intent of the code well enough to try to fix it. Scott McKellar http://home.swbell.net/mck9/ct/

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

2008-01-13 Thread Scott McKellar
. 4. In osrfAppRequestRespondComplete() we were leaking payload in one branch of an if/else. I moved the osrfMessageFree() beyond both branches so that it would be unconditional. Scott McKellar http://home.swbell.net/mck9/ct/ Developer's Certificate of Origin 1.1 By making a contribution

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

2008-01-13 Thread Scott McKellar
, but in run-time testing I have often found it useful to do stupid things in the configuration files or other inputs, in order to see what happens. I won't claim that this technique is always deliberate. Scott McKellar http://home.swbell.net/mck9/ct/

[OPEN-ILS-DEV] PATCH: socket_bundle.c (const-correctness)

2008-01-13 Thread Scott McKellar
These little patches just add the const qualifier to a couple of parameters for socket_open_unix_server() and socket_open_udp_client(). Scott McKellar http://home.swbell.net/mck9/ct/ Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify

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

2008-01-15 Thread Scott McKellar
== osrfMessageFree string_array == osrfStringArray string_array_destroy == osrfStringArrayFree Scott McKellar http://home.swbell.net/mck9/ct/ Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify

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

2008-01-19 Thread Scott McKellar
. --- In osrfSystemBootstrapClientResc() we leak a transport_client. However there is a comment asserting that the leak is unavoidable, so I left that leak alone. Scott McKellar http://home.swbell.net/mck9/ct/ Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify

[OPEN-ILS-DEV] PATCH: oils_utils.[ch] (memory leaks)

2008-01-20 Thread Scott McKellar
but we weren't freeing it. Now we free it. 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

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

2008-01-20 Thread Scott McKellar
This patch plugs a small leak in oilsAuthVerifyPassword(). We were leaking realPassword in the case of an early return. 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

[OPEN-ILS-DEV] osrf_json_xml.c: memory leak and apparent bug

2008-01-27 Thread Scott McKellar
option is to remove this branch altogether. The resulting code would behave exactly the same as it does now, but without leaking. Not sure of how to proceed, I leave this decision to my betters. Scott McKellar http://home.swbell.net/mck9/ct/

[OPEN-ILS-DEV] PATCH: osrf_json_parser.c (memory leak when handling error)

2008-01-31 Thread Scott McKellar
(). 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

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

2008-01-31 Thread Scott McKellar
--- Mike Rylander [EMAIL PROTECTED] wrote: On Jan 15, 2008 9:43 PM, Scott McKellar [EMAIL PROTECTED] wrote: snip 1. In osrf_json_gateway_child_init(): we were leaking allowedServices. Oops. you're right. Sorry. I'm glad you're checking my patches so carefully. Scott McKellar http

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

2008-02-03 Thread Scott McKellar
of jsonObjectToSimpleString() directly to osrfHashGet(), thereby leaking the memory. I captured the pointer and freed it. 8. In doFieldmapperSearch() a do/while loop allocates pkey_val but in some cases wasn't freeing it. Scott McKellar http://home.swbell.net/mck9/ct/ Developer's Certificate of Origin 1.1 By making

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

2008-02-10 Thread Scott McKellar
and primary key, I suspect that 16 characters will almost never be big enough. Even 64 characters might be too short. I don't know how long the values typically are in practice. Scott McKellar http://home.swbell.net/mck9/ct/ Developer's Certificate of Origin 1.1 By making a contribution

[OPEN-ILS-DEV] PATCH: jsonObjectFindPath

2008-02-17 Thread Scott McKellar
look for a bug. I usually find one. (Whoever wrote the man page for strtok on my system evidently agrees with me, though possibly for different reasons. The section on BUGS starts out: Never use these functions.) Scott McKellar http://home.swbell.net/mck9/ct/ Developer's Certificate of Origin

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

2008-02-17 Thread Scott McKellar
that produces the same result with a lot less overhead. 3. For similar reasons I replaced several occurrences of jsonParseString({}) with jsonNewObjectType(JSON_HASH). Scott McKellar http://home.swbell.net/mck9/ct/ Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify

[OPEN-ILS-DEV] What's up with object.c?

2008-02-18 Thread Scott McKellar
this obsolete code? Or do we need to tinker with it just enough to keep it alive a bit longer? Scott McKellar http://home.swbell.net/mck9/ct/

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

2008-02-23 Thread Scott McKellar
This patch plugs a memory leak. In osrfMathRun() we were leaking newParams. 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

Re: [OPEN-ILS-DEV] Integrating automated code analysis tools into regular practice?

2008-02-23 Thread Scott McKellar
--- Dan Scott [EMAIL PROTECTED] wrote: On 22/11/2007, Scott McKellar [EMAIL PROTECTED] wrote: --- Dan Scott [EMAIL PROTECTED] wrote: I was pondering a few possibilities for helping to tighten up our code in a more automated fashion today. I thought I would throw the ideas out

[OPEN-ILS-DEV] PATCH: oils_cstore.c (performance)

2008-02-23 Thread Scott McKellar
to suggest that the RATS reports are of no value. I just don't want anyone to invest them with more significance than they deserve. It might be nice to get Coverity to scan our code... Scott McKellar http://home.swbell.net/mck9/ct/ Developer's Certificate of Origin 1.1 By making a contribution

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

2008-02-23 Thread Scott McKellar
() we were leaking tag in the case of an early return. I plugged that leak. 4. In a couple of spots I replaced buffer_data() with buffer_release(), and eliminated two intermediate variables that are no longer needed. Scott McKellar http://home.swbell.net/mck9/ct/ Developer's Certificate of Origin

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

2008-02-24 Thread Scott McKellar
This patch adds the const qualifier to various parameters. 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

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

2008-02-24 Thread Scott McKellar
These patches apply the const qualifier to various parameters. Note that they depend on previous patches to osrfConfig.[ch]. 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

[OPEN-ILS-DEV] PATCH: socket_bundle.c (latent bugs)

2008-03-01 Thread Scott McKellar
don't. 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

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

2008-03-01 Thread Scott McKellar
prepare a patch to do so. Scott McKellar http://home.swbell.net/mck9/ct/

[OPEN-ILS-DEV] PATCH: osrf_prefork.c (latent bugs)

2008-03-02 Thread Scott McKellar
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. Scott McKellar http://home.swbell.net/mck9/ct/ Developer's Certificate of Origin 1.1 By making a contribution

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

2008-03-09 Thread Scott McKellar
caching by the OS by loading the same file repeatedly. The timings varied somewhat, but the new version was consistently about 7 to 9 times as fast as the old one. Of course we're talking about only a couple of milliseconds... Scott McKellar http://home.swbell.net/mck9/ct/ Developer's Certificate

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

2008-03-09 Thread Scott McKellar
shall prepare some patches accordingly, if I don't hear otherwise. In any case you can always not apply them. Scott McKellar http://home.swbell.net/mck9/ct/

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

2008-03-16 Thread Scott McKellar
commented out in the first place. 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

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

2008-03-16 Thread Scott McKellar
and osrf_big_list.c. 4. osrf_chat_main.c. It leaks memory, but the leaks occur just before returning from main(), so fixing them wouldn't accomplish much. 5. basic_client.c, which doesn't compile and is probably obsolete. Scott McKellar http://home.swbell.net/mck9/ct/ Developer's Certificate

[OPEN-ILS-DEV] PATCH: osrf_router.c (const-correctness)

2008-03-16 Thread Scott McKellar
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. Scott

[OPEN-ILS-DEV] PATCH: osrf_hash.[ch] (performance tweak)

2008-03-20 Thread Scott McKellar
is not as dramatic as I had hoped for, but it's easy to get, and it won't hurt. ...and I belatedly wish everyone at Equinox a happy equinox. Scott McKellar http://home.swbell.net/mck9/ct/ Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify

[OPEN-ILS-DEV] Ruminations on osrfHash

2008-03-22 Thread Scott McKellar
. - Any interest? Scott McKellar http://home.swbell.net/mck9/ct/

[OPEN-ILS-DEV] Ruminations on osrfHash

2008-03-22 Thread Scott McKellar
. - Any interest? Scott McKellar http://home.swbell.net/mck9/ct/

[OPEN-ILS-DEV] PATCH: osrf_router.c (bug fix -- double freeing of memory)

2008-03-22 Thread Scott McKellar
the keys stored in the hash, you should use an osrfHashIterator. At present the iterator approach is less efficient. If we rewrite the osrfHash as I proposed in an earlier post today, the iterator will be as fast, or almost as fast, as traversing the array directly.) Scott McKellar http

Re: [OPEN-ILS-DEV] PATCH revised: osrf_hash.[ch] (performance tweak)

2008-03-22 Thread Scott McKellar
--- Scott McKellar [EMAIL PROTECTED] wrote: 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. The patch attached here supercedes and replaces the patch I posted a couple

[OPEN-ILS-DEV] PATCH: osrf_hash.[ch] (new function)

2008-03-25 Thread Scott McKellar
for myself by sending too many patches to the same files too quickly. 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

SPAM: Re: [OPEN-ILS-DEV] osrfHash: alternative implementation

2008-03-28 Thread Scott McKellar
--- Mike Rylander [EMAIL PROTECTED] wrote: On Mon, Mar 24, 2008 at 8:53 AM, Bill Erickson [EMAIL PROTECTED] wrote: Scott McKellar wrote: snip I can't get too worked up over hash-key ordering ... associative arrays don't have a guaranteed order in other implementation that I know

[OPEN-ILS-DEV] PATCH: oils_idl-core.c and osrf_application.c

2008-03-29 Thread Scott McKellar
These patches use the new function osrfHashIteratorKey() to fetch the current key from an osrfHashIterator, instead of accessing it directly. They depend on previous patches to osrf_hash.h and osrf_hash.c, which haven't been applied yet. Scott McKellar http://home.swbell.net/mck9/ct

[OPEN-ILS-DEV] PATCH: osrf_hash[ch] (new implementation)

2008-04-06 Thread Scott McKellar
patches then. Or I can send you entire files instead of patches. Whatever is least troublesome for you. 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

[OPEN-ILS-DEV] PATCH: apachetools.c (performance)

2008-05-13 Thread Scott McKellar
can devise a more realistic test involving both POST and GET data. 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

Re: [OPEN-ILS-DEV] On the merits of init scripts...

2008-07-16 Thread Scott McKellar
--- Aaron Joyner [EMAIL PROTECTED] wrote: snip -- about a system init script, at least for simple cases Any init script should respect the distinction between OpenSRF (a generic infrastructure layer) and Evergreen (a specific application built on top of OpenSRF). In principle it should be

  1   2   >