Lines Matching refs:root
86 struct ber_element *root = NULL, *elm;
94 if ((root = ber_add_sequence(NULL)) == NULL)
97 elm = ber_printf_elements(root, "d{tdsst", ++ldap->msgid, BER_CLASS_APP,
103 LDAP_DEBUG("aldap_bind", root);
105 error = ber_write_elements(&ldap->ber, root);
106 ber_free_elements(root);
107 root = NULL;
113 if (root != NULL)
114 ber_free_elements(root);
123 struct ber_element *root = NULL, *elm;
126 if ((root = ber_add_sequence(NULL)) == NULL)
128 elm = ber_printf_elements(root, "d{t", ++ldap->msgid, BER_CLASS_APP,
133 LDAP_DEBUG("aldap_unbind", root);
135 error = ber_write_elements(&ldap->ber, root);
136 ber_free_elements(root);
137 root = NULL;
143 if (root != NULL)
144 ber_free_elements(root);
156 struct ber_element *root = NULL, *ber, *c;
159 if ((root = ber_add_sequence(NULL)) == NULL)
162 ber = ber_printf_elements(root, "d{t", ++ldap->msgid, BER_CLASS_APP,
193 LDAP_DEBUG("aldap_search", root);
195 error = ber_write_elements(&ldap->ber, root);
196 ber_free_elements(root);
197 root = NULL;
206 if (root != NULL)
207 ber_free_elements(root);
788 struct ber_element *elm, *root = NULL;
793 root = NULL;
810 root = elm;
827 if ((root = ber_add_sequence(prev)) == NULL)
829 ber_set_header(root, BER_CLASS_CONTEXT, LDAP_FILT_NOT);
832 if ((elm = ldap_do_parse_search_filter(root, &cp)) == NULL)
870 if ((root =
874 ber_set_header(root, BER_CLASS_CONTEXT, LDAP_FILT_PRES);
878 if ((root = ber_add_sequence(prev)) == NULL)
880 ber_set_header(root, BER_CLASS_CONTEXT, type);
882 if ((elm = ber_add_nstring(root, attr_desc, len)) == NULL)
897 ber_set_header(root, BER_CLASS_CONTEXT, LDAP_FILT_SUBS);
950 return (root);
955 if (root != NULL)
956 ber_free_elements(root);
967 ldap_debug_elements(struct ber_element *root)
979 ber_calc_len(root);
981 switch (root->be_encoding) {
984 constructed = root->be_encoding;
991 fprintf(stderr, "%*slen %lu ", indent, "", root->be_len);
992 switch (root->be_class) {
994 fprintf(stderr, "class: universal(%u) type: ", root->be_class);
995 switch (root->be_type) {
1030 root->be_class);
1031 switch (root->be_type) {
1085 fprintf(stderr, "class: private(%u) type: ", root->be_class);
1086 fprintf(stderr, "encoding (%lu) type: ", root->be_encoding);
1090 fprintf(stderr, "class: context(%u) type: ", root->be_class);
1091 switch(root->be_type) {
1098 fprintf(stderr, "class: <INVALID>(%u) type: ", root->be_class);
1102 root->be_type, root->be_encoding);
1105 root->be_encoding = constructed;
1107 switch (root->be_encoding) {
1109 if (ber_get_boolean(root, &d) == -1) {
1116 if (ber_get_integer(root, &v) == -1) {
1123 if (ber_get_enumerated(root, &v) == -1) {
1130 if (ber_get_bitstring(root, (void *)&buf, &len) == -1) {
1140 if (ber_get_oid(root, &o) == -1) {
1147 if (ber_get_nstring(root, (void *)&buf, &len) == -1) {
1162 if (constructed && root->be_sub) {
1164 ldap_debug_elements(root->be_sub);
1167 if (root->be_next)
1168 ldap_debug_elements(root->be_next);