[Openais] Maybe clean up poll_dispatch_delete a bit

Steven Dake sdake at redhat.com
Sat Apr 15 01:12:15 PDT 2006


Thanks for the patch.

The second loop isn't needed.  The routine should return 0 if success
otherwise -EBADF.

I have entered a defect and attached a patch which fixes the problem for
picacho without the second loop.

On Fri, 2006-04-14 at 07:55 -0400, Jeff wrote:
> We are looking at the openais library as a possible transport for a
> project we are undertaking and so I've been reading a bit of the code.
> It struck me that poll_dispatch_delete() in exec/aispoll.c could be
> tightened up a bit. The 2nd "if (found)" block was being executed even
> if the search loop preceeding it did not find a match as long as the
> 1st search loop did. It may be that this is an impossible state, but
> the code implies otherwise.
> It wasn't clear to me whether poll_dispatch_delete() should return 0
> if either loop finds a match or only if both do so I preserved the
> existing behavior.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: defect-1201-picacho.patch
Type: text/x-patch
Size: 1184 bytes
Desc: not available
Url : http://lists.linux-foundation.org/pipermail/openais/attachments/20060415/42f4c529/defect-1201-picacho-0001.bin

More information about the Openais mailing list