[OPEN-ILS-DEV] Bug fix in chunking code

Scott McKellar mck9 at swbell.net
Mon Aug 9 11:00:21 EDT 2010


Earlier this morning I committed a fix (OSRF changeset 1991) to the chunking code in osrf_application.c.  Anyone working from trunk, or from a release that uses the chunking code from changeset 1988, should apply that fix.

Background:

When one of the C methods returns a return code greater than zero, a post-processing step sends a STATUS message to the client, signifying that the response is complete.  The old code did this with some low-level code that bypassed the buffer-flushing that is build into the chunking machinery.  As a result, any messages still in the buffer would be unsent.

Now the post-processing step properly flushes the buffer.

Atomic methods were not affected by this bug.

The system methods normally return a positive return code, and were consequently not working:

    opensrf.system.method
    opensrf.system.method.all
    opensrf.system.echo

The first two of those methods are used by srfsh to implement the introspect command.  So if introspect isn't working on your system, the chunking is broken.

I don't know of any non-system methods that return positive values.  Mostly they return zero, because mostly they send their own STATUS messages, and the buffer gets flushed properly.  However I have not looked systematically for non-system methods with positive return values, so there may be some out there.

Note: I have another commit in the works for the same file, but it is not a bug fix.  It is a cruft-removal patch that should not affect anything visible, and is of low urgency.  If all you want is the bug fix, you can do that manually if necessary or convenient.  Apart from some changes to the comments, it's just a replacement of one function call by a different function call.

Scott McKellar



More information about the Open-ils-dev mailing list