|
| NWDSGetAttrValFlags returns flag=0 |
 |
Fri, 25 Aug 2006 15:59:18 GMT |
Searched the forum for this type of behavior but found no clues...
Using the NDK C API, I'm trying to get each attribute modification
timestamp and will periodically encounter flag=0 which indicates that this
attribute has no values. The behavior, though, has been inconsistent. For a
given attribute, I sometimes get flag=0 and sometimes flag=4. I've managed
to narrow down when this occurs.
Step 1:
On an existing user, perform actions stated below. Attribute 'Description'
returns flag=4, and one attribute value, "testing 1".
Step 2:
Using the NDS client, I edit that user's description and change the value
to "testing 2".
Step 3:
The next time I perform the same actions, the Attribute 'Description'
returns flag=0 and it reports 2 attribute values: the old value "testing
1"
and a blank value "".
Step 4:
Eventually, it will correct itself over a period of time but I haven't
determined the exact frequency.
Program sequence:
for each attrCount {
NWDSGetAttrName()
NWDSGetAttrValFlags()
NWDSGetAttrValModTime()
for each attrValCount {
NWDSComputeAttrValSize()
NWDSGetAttrVal()
}
}
Can anyone tell me why this would be happening?
Using eDirectory 8.6.2; Netware 5.6: tried in clustered and non-clustered
environments.
Thanks,
Mark
|
| Post Reply
|
| Re: NWDSGetAttrValFlags returns flag=0 |
 |
Fri, 25 Aug 2006 19:08:08 GMT |
Hi
Sounds like a bug I submitted:
Bug 128569 NWDSGetAttrCount returning count for deleted values
when attr values are deleted but not yet purged
I'm assuming that your valcount from NWDSGetAttrName is invalid.
I doubt that we'll get a fix for 8.6.2... the bug I entered was resubmitted
against 88. You can confirm that I'm on the right track by explicitly
calling the janitor. You can use dsbrowse to look at the attribute state.
If this isn't the same bug, you might have a synch issue. To work around
the latter you'd want to use DCK_HIGH_CONF
Thanks
Susan
|
| Post Reply
|
| Re: NWDSGetAttrValFlags returns flag=0 |
 |
Sat, 26 Aug 2006 21:51:59 GMT |
Thanks Suzan,
I'm not sure if I'm running into a bug or failing to call the functions in
the correct sequence. After inspecting dsbrowse as you recommended, I
realized that I was not calling getAttrValFlag at the right time. I've
changed it so now it calls per attrValCount.
for each attrCount {
NWDSGetAttrName()
for each attrValCount {
NWDSGetAttrValFlags() //called per attr value
NWDSGetAttrValModTime()
if (flags & DS_PRESENT) > 0 ) { //only get attributes w/ values
NWDSComputeAttrValSize()
NWDSGetAttrVal()
}
}
}
Though, even with these changes I seem to get the same behavior as before.
I can see, for example, that the value for a particular attribute was
modified (this is before being purged by the janitor). Dsbrowse will show
that attribute telephone has two values:
1) flag=0 (not present) and old value (e.g. 222-3333)
2) flag=4 (present) and new value (e.g. 222-5555)
Via the NDK API calls I mentioned, I also see that the attribute value
count is 2 (again, no purge), but here is the difference
1) flag=0 (not present) but I don't fetch the value since the docs that I
read say not to invoke getAttrVal if you get this flag.
2) flag=18 (damaged and a superclass(?!)); again I don't fetch the value
unless it says it is present. I do invoke getAttrValSize which gives some
impossible value.
Can you tell me if I'm using the correct sequence now? Which flag values
indicate that it is ok to continue (e.g. call getAttrVal)?
thanks for any pointers,
Mark
Susan Perrin wrote:
> Sounds like a bug I submitted:
> Bug 128569 NWDSGetAttrCount returning count for deleted values
> when attr values are deleted but not yet purged
> I'm assuming that your valcount from NWDSGetAttrName is invalid.
> I doubt that we'll get a fix for 8.6.2... the bug I entered was resubmitted
> against 88. You can confirm that I'm on the right track by explicitly
> calling the janitor. You can use dsbrowse to look at the attribute state.
> If this isn't the same bug, you might have a synch issue. To work around
> the latter you'd want to use DCK_HIGH_CONF
> Thanks
> Susan
|
| Post Reply
|
| Re: NWDSGetAttrValFlags returns flag=0 |
 |
Sun, 27 Aug 2006 02:26:57 GMT |
Mark
Your order is correct. However, I've checked my code and I call
NWDSComputeAttrValSize() and NWDSGetAttrVal() regardless. I dont check the
flags. There is a very old comment in the code saying that NWDSGetAttrVal()
had to be called even when NWDSComputeAttrValSize() returned a size of zero
in order for subsequent attribute values to be retrieved correctly. That may
or may not still be true.
John
"moffutt" <mychemin@yahoo.com> wrote in message
news:3o3Ig.1143$PP.437@prv-forum2.provo.novell.com...
> Thanks Suzan,
>
> I'm not sure if I'm running into a bug or failing to call the functions in
> the correct sequence. After inspecting dsbrowse as you recommended, I
> realized that I was not calling getAttrValFlag at the right time. I've
> changed it so now it calls per attrValCount.
>
> for each attrCount {
> NWDSGetAttrName()
> for each attrValCount {
> NWDSGetAttrValFlags() //called per attr value
> NWDSGetAttrValModTime()
>
> if (flags & DS_PRESENT) > 0 ) { //only get attributes w/ values
> NWDSComputeAttrValSize()
> NWDSGetAttrVal()
> }
> }
> }
>
> Though, even with these changes I seem to get the same behavior as before.
> I can see, for example, that the value for a particular attribute was
> modified (this is before being purged by the janitor). Dsbrowse will show
> that attribute telephone has two values:
> 1) flag=0 (not present) and old value (e.g. 222-3333)
> 2) flag=4 (present) and new value (e.g. 222-5555)
>
> Via the NDK API calls I mentioned, I also see that the attribute value
> count is 2 (again, no purge), but here is the difference
> 1) flag=0 (not present) but I don't fetch the value since the docs that I
> read say not to invoke getAttrVal if you get this flag.
> 2) flag=18 (damaged and a superclass(?!)); again I don't fetch the value
> unless it says it is present. I do invoke getAttrValSize which gives some
> impossible value.
>
> Can you tell me if I'm using the correct sequence now? Which flag values
> indicate that it is ok to continue (e.g. call getAttrVal)?
>
> thanks for any pointers,
>
> Mark
>
> Susan Perrin wrote:
> > Sounds like a bug I submitted:
>
> > Bug 128569 NWDSGetAttrCount returning count for deleted values
> > when attr values are deleted but not yet purged
>
> > I'm assuming that your valcount from NWDSGetAttrName is invalid.
>
> > I doubt that we'll get a fix for 8.6.2... the bug I entered was
resubmitted
> > against 88. You can confirm that I'm on the right track by
explicitly
> > calling the janitor. You can use dsbrowse to look at the attribute
state.
> > If this isn't the same bug, you might have a synch issue. To work
around
> > the latter you'd want to use DCK_HIGH_CONF
>
> > Thanks
> > Susan
>
>
|
| Post Reply
|
|
|
|
|
|
|
|
|
|