version 1.9, 2019/10/24 12:39:26 |
version 1.10, 2022/03/31 09:03:48 |
|
|
aldap_first_attr(struct aldap_message *msg, char **outkey, |
aldap_first_attr(struct aldap_message *msg, char **outkey, |
struct aldap_stringset **outvalues) |
struct aldap_stringset **outvalues) |
{ |
{ |
struct ber_element *b, *c; |
struct ber_element *b; |
char *key; |
char *key; |
struct aldap_stringset *ret; |
struct aldap_stringset *ret; |
|
|
if (msg->body.search.attrs == NULL) |
if (msg->body.search.attrs == NULL) |
goto fail; |
goto fail; |
|
|
if (ober_scanf_elements(msg->body.search.attrs, "{s(e)}e", |
if (ober_scanf_elements(msg->body.search.attrs, "{s(e)}", |
&key, &b, &c) != 0) |
&key, &b) != 0) |
goto fail; |
goto fail; |
|
|
msg->body.search.iter = msg->body.search.attrs->be_next; |
msg->body.search.iter = msg->body.search.attrs->be_next; |
|
|
aldap_next_attr(struct aldap_message *msg, char **outkey, |
aldap_next_attr(struct aldap_message *msg, char **outkey, |
struct aldap_stringset **outvalues) |
struct aldap_stringset **outvalues) |
{ |
{ |
struct ber_element *a, *b; |
struct ber_element *a; |
char *key; |
char *key; |
struct aldap_stringset *ret; |
struct aldap_stringset *ret; |
|
|
|
|
if (ober_get_eoc(msg->body.search.iter) == 0) |
if (ober_get_eoc(msg->body.search.iter) == 0) |
goto notfound; |
goto notfound; |
|
|
if (ober_scanf_elements(msg->body.search.iter, "{s(e)}e", &key, &a, &b) |
if (ober_scanf_elements(msg->body.search.iter, "{s(e)}", &key, &a) != 0) |
!= 0) |
|
goto fail; |
goto fail; |
|
|
msg->body.search.iter = msg->body.search.iter->be_next; |
msg->body.search.iter = msg->body.search.iter->be_next; |