]> git.sur5r.net Git - openldap/commitdiff
LDAP cancel misc patch
authorJong Hyuk Choi <jongchoi@openldap.org>
Mon, 27 Jan 2003 17:08:51 +0000 (17:08 +0000)
committerJong Hyuk Choi <jongchoi@openldap.org>
Mon, 27 Jan 2003 17:08:51 +0000 (17:08 +0000)
include/ldap.h
libraries/libldap/cancel.c
servers/slapd/cancel.c
servers/slapd/connection.c

index 0686ca17c9bef66e21516dbc9ca3c47a30d7ff9c..b746ad773f3bd7721e7df993c318f7532854d489 100644 (file)
@@ -495,7 +495,7 @@ typedef struct ldapcontrol {
 #define LDAP_CANCEL_NONE                0x00
 #define LDAP_CANCEL_REQ                 0x01
 #define LDAP_CANCEL_ACK                 0x02
-#define LDAP_CANCEL_NOTDONE             0x03
+#define LDAP_CANCEL_DONE                0x03
 
 /*
  * This structure represents both ldap messages and ldap responses.
index 6b8aeac7f2900096a75ee1839969be3f0c1511fe..e42a37afd951bc079decfe09a3c46f5281bb319d 100644 (file)
@@ -1,3 +1,4 @@
+/* $OpenLDAP$ */
 /*
  * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
index 96bd7300b51159797e490bb667f7c7b7fa25bdbe..f9f12ea9e74e8124a59f1947bd7e8a6124ca6fc8 100644 (file)
@@ -1,3 +1,4 @@
+/* $OpenLDAP$ */
 /* cancel.c - LDAP cancel extended operation */
 /*
  * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
@@ -107,8 +108,9 @@ int cancel_extop(
                rc = LDAP_SUCCESS;
        } else {
                rc = op->o_cancel;
-               op->o_cancel = LDAP_CANCEL_NOTDONE;
        }
 
+       op->o_cancel = LDAP_CANCEL_DONE;
+
        return rc;
 }
index ba8d419836914f8517fc1f8de0bacce4c66e35fd..13bdbe36fcb11cd604d411ae1b0503b147fecf03 100644 (file)
@@ -1028,8 +1028,7 @@ operations_error:
                arg->co_op->o_cancel = LDAP_TOO_LATE;
 
        while ( arg->co_op->o_cancel != LDAP_CANCEL_NONE &&
-               arg->co_op->o_cancel != LDAP_CANCEL_ACK  &&
-               arg->co_op->o_cancel != LDAP_CANCEL_NOTDONE ) {
+               arg->co_op->o_cancel != LDAP_CANCEL_DONE ) {
                        ldap_pvt_thread_yield();
        }