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

Re: Do we have Wild card like "."



  Hello Norbert,
               I used this patch on  openLDAP version -2.0.7, but I'm
getting one compile time error  which says--

filterentry.c: In function `test_mra_filter':
filterentry.c:162: request for member `smr_syntax' in something not a
structure or union

     Problem line number has code as below --

           if( strcmp(mra->ma_rule->smr_syntax->ssyn_oid,
                mra->ma_desc->ad_type->sat_syntax->ssyn_oid) != 0)

{
return LDAP_INVALID_SYNTAX;
        }


         Actually  mra is of  struct type  " MatchingRuleAssertion", which
is defined as below--


typedef struct slap_mr_assertion {
        char                                    *ma_rule;       /* optional
*/
        AttributeDescription    *ma_desc;       /* optional */
        int                                             ma_dnattrs; /*
boolean */
        struct berval                   *ma_value;      /* required */
} MatchingRuleAssertion;

but it is trying to assume   "mra->mr_rule "  as struct  and trying to
access it's member, while the LDAP code I'm having,  mra->mr_rule is   a
pointer to character  array.

I suppose  this is because of   openLDAP version mismatch   , could you pls.
highlight on this  error .
        or tell me for this  openLDAP version this patch is for ?

Thanks in Advance
Upma


Norbert Klasen wrote:

> --On Donnerstag, 31. Januar 2002 13:30 -0500 Upma Gandhi
> <upma@npi.stpn.soft.net> wrote:
>
> > To address thfilterentry.c: In function `test_mra_filter':
> filterentry.c:162: request for member `smr_syntax' in something not a
> structure or union is thing, what I'm doing is , I'm taking this DOM as 4
> > bytes string ( 31 days= max of 4 bytes, where each bit represnt that
> > particular day).
> >  so, to store this 4-7 days range, I'm  setting bit number 4 to 7 to
> > "1", rest all bit position to "0".
> >  so, 4-7 range can be stored in LDAP  schema as  a concatenation of
> > (31-7)  zeros followed by  1111000 or more pictorically -
> >
> >   |__________|__________|__________ |__________ |
> >   | 0 0 0 00000| 0 0 00000 0  | 00000000    | 01 1 1 1 0 00|
> >  |--------|--------|--------|--------|
> >
> >           Suppse , today is  5'th day of month and I want to see
> > whether  this DOM field of any record (suppose this DOM is part of one
> > record)   is set or not
>
> You might be able to make DOM a bitString and use the matching rules from
> http://www.openldap.org/lists/openldap-bugs/200109/msg00000.html
>
> --
> Norbert Klasen
> DAASI International GmbH                 phone: +49 7071 29 70336
> Wilhelmstr. 106                          fax:   +49 7071 29 5114
> 72074 Tübingen                           email: norbert.klasen@daasi.de
> Germany                                  web:   http://www.daasi.de