Diff for /servers/slapd/back-relay/op.c between versions 1.38 and 1.39

version 1.38, 2009/06/12 21:12:37 version 1.39, 2009/10/19 21:00:15
Line 1 Line 1
 /* op.c - relay backend operations */  /* op.c - relay backend operations */
 /* $OpenLDAP: pkg/ldap/servers/slapd/back-relay/op.c,v 1.37 2009/06/01 20:27:12 hallvard Exp $ */  /* $OpenLDAP: pkg/ldap/servers/slapd/back-relay/op.c,v 1.38 2009/06/12 21:12:37 hallvard Exp $ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.  /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *   *
  * Copyright 2004-2009 The OpenLDAP Foundation.   * Copyright 2004-2009 The OpenLDAP Foundation.
Line 93  relay_back_response_cb( Operation *op, S Line 93  relay_back_response_cb( Operation *op, S
         return SLAP_CB_CONTINUE;          return SLAP_CB_CONTINUE;
 }  }
   
   /* quick hack for ITS#6337: use malloc'ed callback for bind */
   int
   relay_back_cleanup2_cb( Operation *op, SlapReply *rs )
   {
           op->o_bd = ((relay_callback *) op->o_callback)->rcb_bd;
           op->o_tmpfree( op->o_callback, op->o_tmpmemctx );
           op->o_callback = NULL;
           return SLAP_CB_CONTINUE;
   }
   
   int
   relay_back_response2_cb( Operation *op, SlapReply *rs )
   {
           relay_callback  *rcb = (relay_callback *) op->o_callback;
   
           rcb->rcb_sc.sc_cleanup = relay_back_cleanup2_cb;
           rcb->rcb_bd = op->o_bd;
           op->o_bd = op->o_callback->sc_private;
           return SLAP_CB_CONTINUE;
   }
   
 #define relay_back_add_cb( rcb, op, bd )                        \  #define relay_back_add_cb( rcb, op, bd )                        \
         {                                                       \          {                                                       \
                 (rcb)->rcb_sc.sc_next = (op)->o_callback;       \                  (rcb)->rcb_sc.sc_next = (op)->o_callback;       \
Line 199  relay_back_op( Operation *op, SlapReply Line 220  relay_back_op( Operation *op, SlapReply
         } else if ( (func = (&bd->be_bind)[which]) != 0 ) {          } else if ( (func = (&bd->be_bind)[which]) != 0 ) {
                 relay_callback  rcb;                  relay_callback  rcb;
   
                 relay_back_add_cb( &rcb, op, bd );                  if ( which == op_bind ) {
                           /* quick hack for ITS#6337: use malloc'ed callback for bind */
                           relay_callback *rcbp = op->o_tmpcalloc( sizeof( relay_callback ), 1, op->o_tmpmemctx );
                           relay_back_add_cb( rcbp, op, bd );
                           rcbp->rcb_sc.sc_response = relay_back_response2_cb;
   
                   } else {
                           relay_back_add_cb( &rcb, op, bd );
                   }
   
                 RELAY_WRAP_OP( op, bd, which, {                  RELAY_WRAP_OP( op, bd, which, {
                         rc = func( op, rs );                          rc = func( op, rs );

Removed from v.1.38  
changed lines
  Added in v.1.39


______________
© Copyright 1998-2020, OpenLDAP Foundation, info@OpenLDAP.org