From d387ac4c164917d885cd84bd1b62647d989033ac Mon Sep 17 00:00:00 2001 From: Milan Jurik Date: Sat, 19 May 2012 19:59:14 -0700 Subject: 2705 EOF libldap.so.4 Reviewed by: Jason King Reviewed by: Albert Lee Approved by: Garrett D'Amore --- usr/src/lib/libldap4/common/notif.c | 106 ------------------------------------ 1 file changed, 106 deletions(-) delete mode 100644 usr/src/lib/libldap4/common/notif.c (limited to 'usr/src/lib/libldap4/common/notif.c') diff --git a/usr/src/lib/libldap4/common/notif.c b/usr/src/lib/libldap4/common/notif.c deleted file mode 100644 index f52cd56734..0000000000 --- a/usr/src/lib/libldap4/common/notif.c +++ /dev/null @@ -1,106 +0,0 @@ -/* - * - * Copyright 13/01/98 Sun Microsystems, Inc. All Rights Reserved - * Comments: - * - */ -#pragma ident "%Z%%M% %I% %E% SMI" -#include -#include -#include -#include "lber.h" -#include "ldap.h" -#include "ldap-private.h" -#include "ldap-int.h" - -LDAPMessage *ldap_first_notif(LDAP *ld) -{ - return ld->ld_notifs; -} - -LDAPMessage *ldap_next_notif(LDAP *ld, LDAPMessage *current) -{ - if ( current == NULLMSG ) - return NULLMSG; - else - return current->lm_next; -} - -int ldap_reset_notif(LDAP *ld, int freeit) -{ - LDAPMessage *L_n=NULLMSG; - LDAPMessage *L_q=NULLMSG; - - if ( freeit ) - { - for (L_n=ld->ld_notifs; L_n!=NULLMSG; L_n=L_n->lm_next) - { - if ( L_n->lm_next != NULLMSG ) - { - L_q = L_n->lm_next; - ldap_msgfree(L_n); - L_n = L_q; - } - else - { - ldap_msgfree(L_n); - break; - } - } - } - ld->ld_notifs = NULLMSG; - - return (LDAP_SUCCESS); -} - -int ldap_remove_notif(LDAP *ld, LDAPMessage *notif, int freeit) -{ - LDAPMessage *L_n=NULLMSG, *L_q=NULLMSG; - - for ( L_n=ld->ld_notifs; L_n!=NULLMSG; L_n=L_n->lm_next) - { - if ( L_n == notif) - { - if ( L_q == NULLMSG ) - ld->ld_notifs = L_n->lm_next; - else - L_q->lm_next = L_n->lm_next; - - L_n->lm_next = NULLMSG; - if ( freeit ) - ldap_msgfree(L_n); - - break; - } - L_q = L_n; - } - return (LDAP_SUCCESS); -} - -/* Add in tail */ -int ldap_add_notif(LDAP *ld, LDAPMessage *notif) -{ - LDAPMessage *L_n=NULLMSG, *L_q=NULLMSG; - - for ( L_n=ld->ld_notifs; L_n!=NULLMSG; L_n=L_n->lm_next) - L_q = L_n; - - notif->lm_next = NULLMSG; - if ( L_q == NULLMSG ) - ld->ld_notifs = notif; - else - L_q->lm_next = notif; - - return (LDAP_SUCCESS); -} - -/* Add in head */ -int ldap_insert_notif(LDAP *ld, LDAPMessage *notif) -{ - - notif->lm_next = ld->ld_notifs; - ld->ld_notifs = notif; - - return (LDAP_SUCCESS); -} - -- cgit v1.2.3