From: Howard Chu Date: Wed, 13 Dec 2006 00:36:12 +0000 (+0000) Subject: ITS#4545 when referral chasing is off, complete the request X-Git-Tag: OPENLDAP_REL_ENG_2_4_4ALPHA~8^2~382 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6350fad63f3a28f8acc4ba87dd41fa3ff79322ba;p=thirdparty%2Fopenldap.git ITS#4545 when referral chasing is off, complete the request --- diff --git a/libraries/libldap/result.c b/libraries/libldap/result.c index 03bd73601d..df0b056038 100644 --- a/libraries/libldap/result.c +++ b/libraries/libldap/result.c @@ -655,7 +655,7 @@ nextresp2: lr->lr_msgid, 0, 0 ); } - /* We sucessfully chased the reference */ + /* We successfully chased the reference */ v3ref = V3REF_SUCCESS; } } @@ -728,6 +728,20 @@ nextresp2: LDAP_FREE( lr->lr_res_error ); lr->lr_res_error = NULL; } + + /* Since it's not a SearchReference, it must be a + * result. Since we're not chasing the referral, + * this request is done. + */ + if ( v3ref == V3REF_TOAPP ) { + lr->lr_status = LDAP_REQST_COMPLETED; + Debug( LDAP_DEBUG_TRACE, + "request done: ld %p msgid %d, " + "referral returned to app\n", + (void *)ld, lr->lr_msgid, 0); + ldap_return_request( ld, lr, 1 ); + lr = NULL; + } } } }