1 Nov 2005 01:01
Re: ldb error codes
Simo Sorce <idra <at> samba.org>
2005-11-01 00:01:39 GMT
2005-11-01 00:01:39 GMT
On Tue, 2005-11-01 at 10:32 +1100, tridge <at> samba.org wrote:
> Simo,
>
> > There's a 4th option I like to explore, change the return value of
> > ldb_search into a structure, and have both error code and count hanging
> > on this structure.
>
> That gives me another idea (a 5th option?)
>
> We could change ldb_search like this:
>
> int ldb_search(struct ldb_context *ldb,
> const struct ldb_dn *base,
> enum ldb_scope scope,
> const char *expression,
> const char * const *attrs, struct ldb_result **res);
>
> where ldb_result is this:
>
> struct ldb_result {
> uint_t count;
> struct ldb_message **msgs;
> }
>
> and ldb_search would return an error code, just like all other ldb
> calls.
>
> The advantage of this approach is it will make it easier for us to add
> referral results later, as we can expand the struct ldb_result
> structure with new elements at the end (thats why I made it a pointer
(Continue reading)
Jeremy.
RSS Feed