version 1.109, 2005/10/02 08:48:28
|
version 1.110, 2005/10/02 10:26:02
|
Line 1
|
Line 1
|
/* $OpenLDAP: pkg/ldap/servers/slapd/overlays/syncprov.c,v 1.108 2005/10/02 03:01:45 hyc Exp $ */ |
/* $OpenLDAP: pkg/ldap/servers/slapd/overlays/syncprov.c,v 1.109 2005/10/02 08:48:28 hyc Exp $ */ |
/* syncprov.c - syncrepl provider */ |
/* syncprov.c - syncrepl provider */ |
/* This work is part of OpenLDAP Software <http://www.openldap.org/>. |
/* This work is part of OpenLDAP Software <http://www.openldap.org/>. |
* |
* |
Line 69 typedef struct syncops {
|
Line 69 typedef struct syncops {
|
int s_inuse; /* reference count */ |
int s_inuse; /* reference count */ |
struct syncres *s_res; |
struct syncres *s_res; |
struct syncres *s_restail; |
struct syncres *s_restail; |
void *s_qtask; /* task for playing psearch responses */ |
struct re_s *s_qtask; /* task for playing psearch responses */ |
ldap_pvt_thread_mutex_t s_mutex; |
ldap_pvt_thread_mutex_t s_mutex; |
} syncops; |
} syncops; |
|
|
Line 900 syncprov_qresp( opcookie *opc, syncops *
|
Line 900 syncprov_qresp( opcookie *opc, syncops *
|
if ( so->s_flags & PS_IS_DETACHED ) { |
if ( so->s_flags & PS_IS_DETACHED ) { |
ldap_pvt_thread_mutex_lock( &slapd_rq.rq_mutex ); |
ldap_pvt_thread_mutex_lock( &slapd_rq.rq_mutex ); |
if ( !so->s_qtask ) { |
if ( !so->s_qtask ) { |
so->s_qtask = ldap_pvt_runqueue_insert( &slapd_rq, 0, |
so->s_qtask = ldap_pvt_runqueue_insert( &slapd_rq, 1, |
syncprov_qtask, so, "syncprov_qtask", |
syncprov_qtask, so, "syncprov_qtask", |
so->s_op->o_conn->c_peer_name.bv_val ); |
so->s_op->o_conn->c_peer_name.bv_val ); |
} else { |
} else { |
if (!ldap_pvt_runqueue_isrunning( &slapd_rq, so->s_qtask )) { |
if (!ldap_pvt_runqueue_isrunning( &slapd_rq, so->s_qtask )) { |
|
so->s_qtask->interval.tv_sec = 0; |
ldap_pvt_runqueue_resched( &slapd_rq, so->s_qtask, 0 ); |
ldap_pvt_runqueue_resched( &slapd_rq, so->s_qtask, 0 ); |
|
so->s_qtask->interval.tv_sec = 1; |
} |
} |
} |
} |
ldap_pvt_thread_mutex_unlock( &slapd_rq.rq_mutex ); |
ldap_pvt_thread_mutex_unlock( &slapd_rq.rq_mutex ); |