Commit Graph

15980 Commits

Author SHA1 Message Date
Howard Chu
e86e4f98af ITS#4954 clear c_sasl_dn after error 2007-05-10 19:34:27 +00:00
Howard Chu
2779af4730 ITS#4952 use memcmp to compare CSN values 2007-05-10 18:46:15 +00:00
Hallvard Furuseth
810b2389dc Since we only have LDAP_MAXTHR thread_keys, allow max LDAP_MAXTHR
threads per pool, even when ltp_max_count <= 0 ("unlimited").
Keep ltp_max_count in range [0, LDAP_MAXTHR].
2007-05-09 23:25:03 +00:00
Hallvard Furuseth
f0a1511422 Make ldap_int_thread_userctx_t.ltu_key[] a proper NULL-terminated array.
(setkey/getkey expected that, but purgekey could set a NULL in the middle.)
Added some checks for input key!=NULL.

API changes, need review - I'm not sure what's indented here:
- setkey(data=NULL, kfree!=NULL) searched as if intended to reset
  the key, but updated by setting the key.  Now always updates.
- setkey(key=<not found>, data=NULL) could return either success or
  failure.  Now succeeds iff (data == NULL && kfree == NULL).
2007-05-09 22:59:04 +00:00
Hallvard Furuseth
f5da908c49 thread_keys is a (poor) open-addessed hash table, but it lacked a
"deleted item" mark.  Add DELETED_THREAD_CTX.
Also improve the hash function a bit, and make the hash unsigned.
2007-05-09 22:22:44 +00:00
Hallvard Furuseth
8a92825225 Protect thread_keys[] with ldap_pvt_thread_pool_mutex, except in
ldap_pvt_thread_pool_purgekey() which may only be called during pauses.

Thus, also wait for pauses to finish before accessing thread_keys in
ldap_int_thread_pool_wrapper().  This may prevent pending tasks from
being started when a pause had been requested, which seems to have been
possible.  If that was a feature, we can split ltp_pause==1 in 2 states:
in pause (causes wait), and pause requested.

Also move 'thread_keys[].id = <thread id>' from pool_submit to
pool_wrapper.  Until pool_wrapper set the ctx as well, thread context
lookup would just return NULL anyway.
2007-05-09 21:38:28 +00:00
Hallvard Furuseth
92afeb8ef7 Replace state LDAP_INT_THREAD_POOL_PAUSING with member ltp_pause,
so a pause will work during states FINISHING and STOPPING.

Add missing waits and signals, and move waits in pool_wrapper().
Replace if(test) with while(test) when waiting for the multi-purpose
condition variable ltp_cond.
2007-05-09 19:53:25 +00:00
Hallvard Furuseth
9e9bf22a64 ITS#4943:
In ldap_pvt_thread_pool_submit(), when backing out of thread creation:
  ltp_pending_count '++' -> '--'.  Signal if there are no more threads.
In ldap_int_thread_pool_wrapper():
  if() -> assert() where false would result in eternal loop.
2007-05-09 19:34:49 +00:00
Hallvard Furuseth
bb890724d4 Don't complain if detached threads exit after ldap_debug_thread_destroy(). 2007-05-09 19:21:08 +00:00
Hallvard Furuseth
584ea90db2 Remove unused variables 2007-05-09 19:11:44 +00:00
Hallvard Furuseth
5a6362c453 assert(pointer) -> assert(pointer != NULL) 2007-05-09 19:10:36 +00:00
Hallvard Furuseth
d72acf7250 Struct/array initializers must be constant expressions in C89 2007-05-09 19:09:32 +00:00
Hallvard Furuseth
7b7b137832 Cast Debug(%p) pointer argument to void* 2007-05-09 18:38:10 +00:00
Hallvard Furuseth
feb7bc4524 Rebuild 2007-05-09 18:19:17 +00:00
Hallvard Furuseth
bbc719ca56 ITS#4948: '#if <undefined macro>' -> '#ifdef' warning cleanup 2007-05-09 18:17:10 +00:00
Howard Chu
f886eaa59c coverity scan, e is non-NULL 2007-05-08 14:17:21 +00:00
Howard Chu
b7cfa97817 coverity error, u->lud_scheme is mandatory 2007-05-08 14:13:18 +00:00
Howard Chu
eb6b265009 coverity scan, fix typo 2007-05-08 14:07:52 +00:00
Howard Chu
b626499794 coverity error, memory leak in file2anlist 2007-05-08 14:04:23 +00:00
Howard Chu
626e9aabea coverity scan, ch_realloc won't return NULL 2007-05-08 14:01:16 +00:00
Howard Chu
b87965303e coverity fix, slapd_rw_apply NULL filter 2007-05-08 13:57:13 +00:00
Ralf Haferkamp
f8c94e3155 fix comparison with string literal 2007-05-07 14:55:45 +00:00
Howard Chu
dda5e19904 ITS#4949 make config_syslog accumulate across multiple values
Can set to zero to explicitly clear it. (As well as just deleting
all values.)
2007-05-05 01:22:29 +00:00
Howard Chu
1365ec745e ITS#4939 fix typo 2007-04-29 06:14:03 +00:00
Howard Chu
8ac19f0847 ITS#4917 preserve old sat_ad_mutex 2007-04-24 12:02:53 +00:00
Howard Chu
8033f476f4 Disallow runtime delete of modload values 2007-04-24 11:46:22 +00:00
Howard Chu
4803e9ba67 Revert prev commit, unnecessary 2007-04-23 14:27:07 +00:00
Howard Chu
7eb1f62f9d ITS#4935 SASL_MAX_BUFF_SIZE should be 2^24 - 1 2007-04-23 14:21:48 +00:00
Kurt Zeilenga
f810e6ed41 Distinguish absent control value from empty control value. 2007-04-20 22:32:58 +00:00
Quanah Gibson-Mount
e5bf0c31c3 alphabetize options listing correctly. (relocate -g option) 2007-04-20 21:52:46 +00:00
Quanah Gibson-Mount
f6085828b2 add -s option to top list of arguments 2007-04-20 04:53:42 +00:00
Pierangelo Masarati
b013847111 fix ';binary' certificate transport (ITS#4868); add cert to sql-test000 (mysql; psql untested) 2007-04-12 01:02:01 +00:00
Pierangelo Masarati
a01d9f961d fix no-op crasher (ITS#4925) 2007-04-11 20:31:49 +00:00
Pierangelo Masarati
f29a4e140e don't assert(0); apparently, other responses may result from a simple bind (but log them, at least; ITS#4924) 2007-04-11 08:57:41 +00:00
Howard Chu
bfa0d15834 Fix prev commit, filter construction with URI filters 2007-04-10 02:38:54 +00:00
Hallvard Furuseth
1c87542ea1 Add missing return from void *bdb_tool_trickle_task() 2007-04-09 22:45:21 +00:00
Howard Chu
87466fc7c8 Add trickle-sync for quick mode 2007-04-07 06:10:01 +00:00
Quanah Gibson-Mount
ce58d69810 More attr= to attrs= fixes 2007-04-06 06:01:50 +00:00
Quanah Gibson-Mount
1cb03ef4d4 s/attr=/attrs=/ 2007-04-06 05:56:44 +00:00
Howard Chu
97d0de6c1f ITS#4915 log failure retry status 2007-04-06 01:16:55 +00:00
Howard Chu
0c2d84819d Fix prev commit, config_obsolete 2007-04-06 00:31:08 +00:00
Howard Chu
a2405e0a7e Axe slurpd / replog support 2007-04-06 00:21:02 +00:00
Howard Chu
8ea3f17254 Regenerate without slurpd 2007-04-05 23:44:27 +00:00
Howard Chu
66eba3ba9c slurpd is strongly deprecated 2007-04-05 23:41:35 +00:00
Howard Chu
819cf670f3 slurpd is strongly deprecated 2007-04-05 23:28:06 +00:00
Howard Chu
3d1fe19acc slurpd is strongly deprecated 2007-04-05 23:20:04 +00:00
Ralf Haferkamp
d06a8bd198 olcDatabase=config always gets index 0,
don't allow multiple olcDatabase=config entries (ITS#4914)
2007-04-05 16:12:24 +00:00
Howard Chu
75e1f0ef68 ITS#4911 move slap_op_init/destroy to slap_init/destroy 2007-04-05 01:39:24 +00:00
Howard Chu
c3998fb210 ITS#4897 source/destination confusion 2007-04-05 01:20:42 +00:00
Howard Chu
b671fa0f10 ITS#4877 document -s newsuperior option 2007-04-05 01:18:31 +00:00