]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/backglue.c
reduce code duplication
[openldap] / servers / slapd / backglue.c
index b3ca5d48322e997f3a384d0736eb455339b88b80..cc104ce3ca762eefc9d8e34462a78b879a13ecb1 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2001-2009 The OpenLDAP Foundation.
+ * Copyright 2001-2010 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -535,17 +535,18 @@ end_of_loop:;
 
                break;
        }
+
+       op->o_callback = cb.sc_next;
        if ( op->o_abandon ) {
                rs->sr_err = SLAPD_ABANDON;
        } else {
-               op->o_callback = cb.sc_next;
                rs->sr_err = gs.err;
                rs->sr_matched = gs.matched;
                rs->sr_ref = gs.refs;
-               rs->sr_ctrls = gs.ctrls;
-
-               send_ldap_result( op, rs );
        }
+       rs->sr_ctrls = gs.ctrls;
+
+       send_ldap_result( op, rs );
 
        op->o_bd = b0;
        op->o_bd->bd_info = bi0;