diff options
author | Milan Jurik <milan.jurik@xylab.cz> | 2012-05-19 19:59:14 -0700 |
---|---|---|
committer | Milan Jurik <milan.jurik@xylab.cz> | 2012-05-19 19:59:14 -0700 |
commit | d387ac4c164917d885cd84bd1b62647d989033ac (patch) | |
tree | 3c8503aa5915728ea1f848bfaaecb91ab62a4d91 /usr/src/lib/libldap4/common/notif.c | |
parent | ad2de4358b2074634b0f2355c34b0986da0e95f9 (diff) | |
download | illumos-joyent-d387ac4c164917d885cd84bd1b62647d989033ac.tar.gz |
2705 EOF libldap.so.4
Reviewed by: Jason King <jason.brian.king@gmail.com>
Reviewed by: Albert Lee <trisk@nexenta.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Diffstat (limited to 'usr/src/lib/libldap4/common/notif.c')
-rw-r--r-- | usr/src/lib/libldap4/common/notif.c | 106 |
1 files changed, 0 insertions, 106 deletions
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 <stdio.h> -#include <ctype.h> -#include <string.h> -#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); -} - |