~ttx/ubuntu/lucid/openldap/cleanup-olcaccess

« back to all changes in this revision

Viewing changes to servers/slapd/daemon.c

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug
  • Date: 2010-02-18 00:58:13 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20100218005813-8230cn0y207m8wzy
Tags: 2.4.21-0ubuntu1
* New upstream release.
* debian/rules, debian/schema/extra/: 
  Fix get-orig-source rule to supports extra schemas shipped as part of the
  debian/schema/ directory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $OpenLDAP: pkg/ldap/servers/slapd/daemon.c,v 1.380.2.31 2009/08/25 22:44:25 quanah Exp $ */
 
1
/* $OpenLDAP: pkg/ldap/servers/slapd/daemon.c,v 1.380.2.33 2009/11/17 17:08:41 quanah Exp $ */
2
2
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
3
3
 *
4
4
 * Copyright 1998-2009 The OpenLDAP Foundation.
989
989
void
990
990
slapd_set_read( ber_socket_t s, int wake )
991
991
{
 
992
        int do_wake = 1;
992
993
        ldap_pvt_thread_mutex_lock( &slap_daemon.sd_mutex );
993
994
 
994
 
        assert( SLAP_SOCK_IS_ACTIVE( s ));
995
 
        if (!SLAP_SOCK_IS_READ( s )) SLAP_SOCK_SET_READ( s );
996
 
 
 
995
        if( SLAP_SOCK_IS_ACTIVE( s ) && !SLAP_SOCK_IS_READ( s )) {
 
996
                SLAP_SOCK_SET_READ( s );
 
997
        } else {
 
998
                do_wake = 0;
 
999
        }
997
1000
        ldap_pvt_thread_mutex_unlock( &slap_daemon.sd_mutex );
998
 
        WAKE_LISTENER(wake);
 
1001
        if ( do_wake )
 
1002
                WAKE_LISTENER(wake);
999
1003
}
1000
1004
 
1001
1005
time_t
1620
1624
                        "daemon: lutil_pair() failed rc=%d\n", rc, 0, 0 );
1621
1625
                return rc;
1622
1626
        }
 
1627
        ber_pvt_socket_set_nonblock( wake_sds[1], 1 );
1623
1628
 
1624
1629
        SLAP_SOCK_INIT;
1625
1630