[Date Prev][Date Next]
Re: Missing error codes in slapd/backglue.c:glue_back_search() (ITS#1675)
A question this brings up.
With multiple backends, do we want the operation to fail if any one of
the backends fail, or do we want the operation to fail only if all the
Should this be user definable?
>>[mailto:owner-openldap-bugs@OpenLDAP.org]On Behalf Of
>>If scope != LDAP_SCOPE_BASE and a timelimit or sizelimit is exceeded,
>>rc is returned uninitialized and something (gs.err?) should be set to
>>LDAP_<TIME/SIZE>LIMIT_EXCEEDED. Or maybe it should only be set to
>>*LIMIT_EXCEEDED if there is not a "stronger" error there already.
>>Though it only pays attention to the _last_ result code in any case;
>>that seems strange.
> Error handling is definitely a bit of guess work. The goal was to never
> return a fatal error code as long as any one of the backends returns a
> valid result. However, the LIMIT errors definitely need to be set, thanks
> for pointing that out.
>>Also, rc is returned uninitialized if scope != LDAP_SCOPE_BASE and
>>there is no backend with a be->be_search routine.
>>BTW, after fixing this, you'll get rid of a gcc 'variable might
>>be used uninitialized' warning if you replace the switch with an
>>`if (scope == LDAP_SCOPE_BASE) ... else ...' statement.
> -- Howard Chu
> Chief Architect, Symas Corp. Director, Highland Sun
> http://www.symas.com http://highlandsun.com/hyc
> Symas: Premier OpenSource Development and Support
http://linuxquestions.org/ - Ask linux questions, give linux help.
http://splint.org/ - Write safe C code. splint source-code analyzer.