Hello everyone,
As mentioned before, I'm working on an overlay. And, I need to retrieve all the attributes send with the search request. Here is a part of my source:
AttributeDescription* patt = op->oq_search.rs_attrs->an_desc; while(patt != NULL) { fprintf(fdebug, "attributes: %*s \n", (int) patt->ad_cname.bv_len, patt->ad_cname.bv_val); patt = patt->ad_next; }
This only writes the name of the first attribute to the "fdebug" file. And the "patt->ad_next" is NULL (even when I've lots of attributes in my request). I tried using the AttributeName with the "an_name", but in the AttibuteName structure there is no pointer to the next AttibuteName. I could realy use some help! Thanks!
You're not supposed to do that. The search attributes are stored as an array (not a list) of AttributeName structures. This is because a search request may legitimately contain non-attribute values (e.g. '*', a non-existing attribute name, attribute names with options and so. The array is terminated by an attribute name with an_value.bv_val == NULL.
p.