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

Mike Rylander mrylander at gmail.com
Sun May 20 22:00:39 EDT 2007


Scott,

I've gathered up some of your surrounding commentary on osrf_system.c
(username potentially causing segfault, etc) and extended this patch
to include checks for other required fields.  I applied some
reordering, so that the log file is checked first (so we can do some
logging) but generally followed your convention.  If you have a
minute, please take a look at

http://open-ils.org/cgi-bin/viewcvs.cgi/ILS/OpenSRF/src/libstack/osrf_system.c?r1=1.33&r2=1.31&diff_format=l
  or
http://ln-s.net/XWF

and eyeball the diff for anything obvious.

Thanks a ton for the patch ... keep 'em coming!

--miker

On 5/20/07, Scott McKellar <mck9 at swbell.net> wrote:
> This patch includes a collection of tweaks to the
> osrf_system_bootstrap_client_resc function.  These tweaks are pretty
> much independent of each other, so you can pick and choose which ones
> you want to keep.
>
> 1. In an earlier proposed patch I fixed a segfault that occurred
> when the config file was empty or didn't specify a domain.  In that
> patch I simply replaced the domain with an empty string.
>
> The current patch provides an alternative approach.  I issue a
> message to stderr, release locally allocated resources, and return 0
> to indicate failure.
>
> 2. If the configuration file doesn't specify a log file, we issue an
> error message and return -1.  I added some code to plug some memory
> leaks.  I also expanded the error message to make it more informative.
> If I were a naive user and got a message that just said "Log file
> needed", I would have trouble figuring out exactly what that meant.
>
> 3. I made the host variable const.  Whoop ti do.
>
> 4. I eliminated a couple of pointless calls to memset().
>
> Scott McKellar
> http://home.swbell.net/mck9/aargh/
>
> Developer's Certificate of Origin 1.1 By making a contribution to
> this project, I certify that:
>
> (a) The contribution was created in whole or in part by me and I
> have the right to submit it under the open source license indicated
> in the file; or
>
> (b) The contribution is based upon previous work that, to the best
> of my knowledge, is covered under an appropriate open source license
> and I have the right under that license to submit that work with
> modifications, whether created in whole or in part by me, under the
> same open source license (unless I am permitted to submit under a
> different license), as indicated in the file; or
>
> (c) The contribution was provided directly to me by some other person
> who certified (a), (b) or (c) and I have not modified it; and
>
> (d) In the case of each of (a), (b), or (c), I understand and agree
> that this project and the contribution are public and that a record
> of the contribution (including all personal information I submit
> with it, including my sign-off) is maintained indefinitely and may
> be redistributed consistent with this project or the open source
> license indicated in the file.
>


-- 
Mike Rylander


More information about the Open-ils-dev mailing list