Lines Matching refs:lr

27 static void addFollowedRef(LDAPRequest *lr, char *ref);
28 static void addToFollowRef(LDAPRequest *lr, char *ref);
29 static int addUnFollowedRef(LDAP *ld, LDAPRequest *lr, char *ref);
99 chase_referrals( LDAP *ld, LDAPRequest *lr, char **refs, int *count, int samerequest )
121 if ( lr->lr_parentcnt >= ld->ld_refhoplimit ) {
134 for ( origreq = lr; origreq->lr_parent != NULL;
152 addUnFollowedRef(ld, lr, refs[i]);
162 addUnFollowedRef(ld, lr, refs[i]);
191 lr, srv, NULL, 1 ) >= 0 ) {
194 addFollowedRef(lr, refs[i]);
196 addToFollowRef(lr, refs[j]);
204 addUnFollowedRef(ld, lr, refs[i]);
224 static void addFollowedRef(LDAPRequest *lr, char *ref)
228 if (lr->lr_ref_followed == NULL){
229 if ((lr->lr_ref_followed = (char **)calloc(2, sizeof(char*))) == NULL)
233 for (i = 0; lr->lr_ref_followed[i] != NULL; i++);
234 if ((lr->lr_ref_followed = (char **)realloc((char *)lr->lr_ref_followed, (i+2) * sizeof(char *))) == NULL){
238 lr->lr_ref_followed[i++] = strdup(ref);
239 lr->lr_ref_followed[i] = NULL;
243 static void addToFollowRef(LDAPRequest *lr, char *ref)
247 if (lr->lr_ref_tofollow == NULL){
248 if ((lr->lr_ref_tofollow = (char **)calloc(2, sizeof(char*))) == NULL)
252 for (i = 0; lr->lr_ref_tofollow[i] != NULL; i++);
253 if ((lr->lr_ref_tofollow = (char **)realloc((char *)lr->lr_ref_tofollow, (i+2) * sizeof(char *))) == NULL){
257 lr->lr_ref_tofollow[i++] = strdup(ref);
258 lr->lr_ref_tofollow[i] = NULL;
262 static int addUnFollowedRef(LDAP *ld, LDAPRequest *lr, char *ref)
266 if (lr->lr_ref_unfollowed == NULL){
267 if ((lr->lr_ref_unfollowed = (char **)calloc(2, sizeof(char*))) == NULL){
273 for (i = 0; lr->lr_ref_unfollowed[i] != NULL; i++);
274 if ((lr->lr_ref_unfollowed = (char **)realloc((char *)lr->lr_ref_unfollowed, (i+2) * sizeof(char *))) == NULL){
279 lr->lr_ref_unfollowed[i++] = strdup(ref);
280 lr->lr_ref_unfollowed[i] = NULL;
502 LDAPRequest *lr;
504 for ( lr = ld->ld_requests; lr != NULL; lr = lr->lr_next ) {
505 if ( msgid == lr->lr_msgid ) {
510 return( lr );