From 4f64bd9402b27a73339017d72aa59896123f5462 Mon Sep 17 00:00:00 2001 From: Jong Hyuk Choi Date: Mon, 27 Jan 2003 17:08:51 +0000 Subject: [PATCH] LDAP cancel misc patch --- include/ldap.h | 2 +- libraries/libldap/cancel.c | 1 + servers/slapd/cancel.c | 4 +++- servers/slapd/connection.c | 3 +-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/ldap.h b/include/ldap.h index 0686ca17c9..b746ad773f 100644 --- a/include/ldap.h +++ b/include/ldap.h @@ -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. diff --git a/libraries/libldap/cancel.c b/libraries/libldap/cancel.c index 6b8aeac7f2..e42a37afd9 100644 --- a/libraries/libldap/cancel.c +++ b/libraries/libldap/cancel.c @@ -1,3 +1,4 @@ +/* $OpenLDAP$ */ /* * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file diff --git a/servers/slapd/cancel.c b/servers/slapd/cancel.c index 96bd7300b5..f9f12ea9e7 100644 --- a/servers/slapd/cancel.c +++ b/servers/slapd/cancel.c @@ -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; } diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index ba8d419836..13bdbe36fc 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -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(); } -- 2.39.5