[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#5035) Warning patrol

h.b.furuseth@usit.uio.no wrote:
>>> #2.  The return value from op->o_callback->sc_cleanup() is never
>>> used.  Should it be?  I noticed because the pcache_op_cleanup()
>>> function does not return anything.  What should it return?
>> two possibilities:
>> a) ignore it: cleanup could occur too late, when response has already
>> been returned to client; in this case a return code is there only
>> because of the standard API
>> b) handle it: cleanup return code could be usefully returned to caller
>> if (a), then the return code can be safely ignored
> If (a), I suggest the prototype should be changed to return void.
> I'll leave that to whoever knows overlays well though.
> For now, Ralf updated pcache_op_cleanup() to return SLAP_CB_CONTINUE,
> and I've copied that to RE23.
Yes, the _cleanup return code is ignored; all cleanup handlers are called 
regardless of what any previous handler returned.

   -- Howard Chu
   Chief Architect, Symas Corp.  http://www.symas.com
   Director, Highland Sun        http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP     http://www.openldap.org/project/