[Fedora-directory-commits] ldapserver/ldap/servers/plugins/shared utils.c, 1.6, 1.7
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/shared
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/plugins/shared
Modified Files:
utils.c
Log Message:
Resolves: #188320
Summary: HP-UX: warnings reported by the HP-UX compiler
Index: utils.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/shared/utils.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- utils.c 10 Nov 2006 23:45:30 -0000 1.6
+++ utils.c 18 Oct 2007 00:08:32 -0000 1.7
@@ -97,7 +97,6 @@
Slapi_PBlock *
readPblockAndEntry( const char *baseDN, const char *filter,
char *attrs[] ) {
- int result = 0;
Slapi_PBlock *spb = NULL;
BEGIN
@@ -107,15 +106,15 @@
spb = slapi_search_internal((char *)baseDN, LDAP_SCOPE_BASE,
(char *)filter, NULL, attrs, 0);
if ( !spb ) {
- result = op_error(20);
+ op_error(20);
break;
}
if ( slapi_pblock_get( spb, SLAPI_PLUGIN_INTOP_RESULT, &sres ) ) {
- result = op_error(21);
+ op_error(21);
break;
} else if (sres) {
- result = op_error(22);
+ op_error(22);
break;
}
END
@@ -166,7 +165,6 @@
*/
Slapi_PBlock *
dnHasObjectClass( const char *baseDN, const char *objectClass ) {
- int result = 0;
char *filter = NULL;
Slapi_PBlock *spb = NULL;
@@ -184,7 +182,7 @@
if ( slapi_pblock_get(spb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES,
&entries) ) {
- result = op_error(23);
+ op_error(23);
break;
}
/*
@@ -213,7 +211,6 @@
*/
Slapi_PBlock *
dnHasAttribute( const char *baseDN, const char *attrName ) {
- int result = 0;
Slapi_PBlock *spb = NULL;
char *filter = NULL;
@@ -229,21 +226,21 @@
spb = slapi_search_internal((char *)baseDN, LDAP_SCOPE_BASE,
filter, NULL, attrs, 0);
if ( !spb ) {
- result = op_error(20);
+ op_error(20);
break;
}
if ( slapi_pblock_get( spb, SLAPI_PLUGIN_INTOP_RESULT, &sres ) ) {
- result = op_error(21);
+ op_error(21);
break;
} else if (sres) {
- result = op_error(22);
+ op_error(22);
break;
}
if ( slapi_pblock_get(spb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES,
&entries) ) {
- result = op_error(23);
+ op_error(23);
break;
}
/*
16 years, 6 months
[Fedora-directory-commits] ldapserver/ldap/servers/plugins/retrocl retrocl_trim.c, 1.7, 1.8
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/retrocl
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/plugins/retrocl
Modified Files:
retrocl_trim.c
Log Message:
Resolves: #188320
Summary: HP-UX: warnings reported by the HP-UX compiler
Index: retrocl_trim.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/retrocl/retrocl_trim.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- retrocl_trim.c 10 Nov 2006 23:45:18 -0000 1.7
+++ retrocl_trim.c 18 Oct 2007 00:08:32 -0000 1.8
@@ -363,7 +363,6 @@
void retrocl_housekeeping ( time_t cur_time, void *noarg )
{
- static time_t thread_start_time;
int ldrc;
if (retrocl_be_changelog == NULL) {
@@ -402,7 +401,6 @@
if ( must_trim ) {
LDAPDebug(LDAP_DEBUG_TRACE,"changelog about to create thread\n",0,0,0);
/* Start a thread to trim the changelog */
- thread_start_time = cur_time;
ts.ts_s_trimming = 1;
if ( PR_CreateThread( PR_USER_THREAD,
changelog_trim_thread_fn, NULL,
16 years, 6 months
[Fedora-directory-commits] ldapserver/ldap/servers/plugins/replication cl5_api.c, 1.18, 1.19 cl5_config.c, 1.7, 1.8 repl5_connection.c, 1.7, 1.8 repl5_inc_protocol.c, 1.10, 1.11 repl5_plugins.c, 1.8, 1.9 repl5_replica.c, 1.14, 1.15 repl5_total.c, 1.9, 1.10 repl_controls.c, 1.8, 1.9 repl_extop.c, 1.11, 1.12 repl_monitor.c, 1.6, 1.7 replutil.c, 1.10, 1.11 windows_connection.c, 1.17, 1.18 windows_inc_protocol.c, 1.14, 1.15 windows_private.c, 1.16, 1.17 windows_protocol_util.c, 1.36, 1.37 windows_tot_protocol.
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/replication
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/plugins/replication
Modified Files:
cl5_api.c cl5_config.c repl5_connection.c repl5_inc_protocol.c
repl5_plugins.c repl5_replica.c repl5_total.c repl_controls.c
repl_extop.c repl_monitor.c replutil.c windows_connection.c
windows_inc_protocol.c windows_private.c
windows_protocol_util.c windows_tot_protocol.c
Log Message:
Resolves: #188320
Summary: HP-UX: warnings reported by the HP-UX compiler
Index: cl5_api.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/cl5_api.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- cl5_api.c 16 Oct 2007 21:22:47 -0000 1.18
+++ cl5_api.c 18 Oct 2007 00:08:31 -0000 1.19
@@ -348,7 +348,9 @@
static int _cl5WriteBervals (struct berval **bv, char** buff, unsigned int *size);
/* replay iteration */
+#ifdef FOR_DEBUGGING
static PRBool _cl5ValidReplayIterator (const CL5ReplayIterator *iterator);
+#endif
static int _cl5PositionCursorForReplay (ReplicaId consumerRID, const RUV *consumerRuv,
Object *replica, Object *fileObject, CL5ReplayIterator **iterator);
static int _cl5CheckMissingCSN (const CSN *minCsn, const RUV *supplierRUV, CL5DBFile *file);
@@ -3766,7 +3768,6 @@
/* must be called under the state lock */
static void _cl5Close ()
{
- int rc2 = 0;
PRIntervalTime interval;
if (s_cl5Desc.dbState != CL5_STATE_CLOSED) /* Don't try to close twice */
@@ -3792,7 +3793,7 @@
if (s_cl5Desc.dbEnv)
{
DB_ENV *dbEnv = s_cl5Desc.dbEnv;
- rc2 = dbEnv->close(dbEnv, 0);
+ dbEnv->close(dbEnv, 0);
s_cl5Desc.dbEnv = NULL;
}
@@ -5596,6 +5597,7 @@
return retval;
}
+#ifdef FOR_DEBUGGING
/* Replay iteration helper functions */
static PRBool _cl5ValidReplayIterator (const CL5ReplayIterator *iterator)
{
@@ -5606,6 +5608,7 @@
return PR_TRUE;
}
+#endif
/* Algorithm: ONREPL!!!
*/
@@ -5628,7 +5631,6 @@
int rc = CL5_SUCCESS;
Object *supplierRuvObj = NULL;
RUV *supplierRuv = NULL;
- ReplicaId supplierRID;
PRBool newReplica;
PRBool haveChanges = PR_FALSE;
char *agmt_name;
@@ -5638,7 +5640,6 @@
csnStr[0] = '\0';
file = (CL5DBFile*)object_get_data (fileObj);
- supplierRID = replica_get_rid((Replica*)object_get_data(replica));
/* get supplier's RUV */
supplierRuvObj = replica_get_ruv((Replica*)object_get_data(replica));
Index: cl5_config.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/cl5_config.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- cl5_config.c 16 Oct 2007 21:22:47 -0000 1.7
+++ cl5_config.c 18 Oct 2007 00:08:31 -0000 1.8
@@ -330,7 +330,7 @@
slapi_ch_free_string(&config.maxAge);
config.maxAge = slapi_ch_strdup(CL5_STR_IGNORE);
config.dbconfig.maxChCacheEntries = 0;
- config.dbconfig.maxChCacheSize = CL5_NUM_IGNORE;
+ config.dbconfig.maxChCacheSize = (PRUint32)CL5_NUM_IGNORE;
slapi_pblock_get( pb, SLAPI_MODIFY_MODS, &mods );
for (i = 0; mods[i] != NULL; i++)
@@ -438,7 +438,7 @@
}
if (config.dbconfig.maxChCacheEntries == 0)
config.dbconfig.maxChCacheEntries = originalConfig->dbconfig.maxChCacheEntries;
- if (config.dbconfig.maxChCacheSize == CL5_NUM_IGNORE)
+ if (config.dbconfig.maxChCacheSize == (PRUint32)CL5_NUM_IGNORE)
config.dbconfig.maxChCacheSize = originalConfig->dbconfig.maxChCacheSize;
@@ -567,7 +567,7 @@
}
}
- if (config.dbconfig.maxChCacheEntries != 0 || config.dbconfig.maxChCacheSize != CL5_NUM_IGNORE)
+ if (config.dbconfig.maxChCacheEntries != 0 || config.dbconfig.maxChCacheSize != (PRUint32)CL5_NUM_IGNORE)
clcache_set_config(&config.dbconfig);
done:;
Index: repl5_connection.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_connection.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- repl5_connection.c 10 Nov 2006 23:45:17 -0000 1.7
+++ repl5_connection.c 18 Oct 2007 00:08:31 -0000 1.8
@@ -471,7 +471,6 @@
LDAPControl *server_controls[3];
/* LDAPControl **loc_returned_controls; */
const char *op_string = NULL;
- const char *extra_op_string = NULL;
int msgid = 0;
server_controls[0] = &manageDSAITControl;
@@ -562,7 +561,6 @@
case CONN_EXTENDED_OPERATION:
conn->status = STATUS_PROCESSING_EXTENDED_OPERATION;
op_string = "extended";
- extra_op_string = extop_oid;
rc = ldap_extended_operation(conn->ld, extop_oid, extop_payload,
server_controls, NULL /* clientctls */, &msgid);
}
@@ -864,7 +862,6 @@
ConnResult
conn_connect(Repl_Connection *conn)
{
- int ldap_rc;
int optdata;
int secure = 0;
char* binddn = NULL;
@@ -1012,7 +1009,7 @@
}
else
{
- conn->last_ldap_error = ldap_rc = LDAP_SUCCESS;
+ conn->last_ldap_error = LDAP_SUCCESS;
conn->state = STATE_CONNECTED;
return_value = CONN_OPERATION_SUCCESS;
}
@@ -1028,7 +1025,7 @@
close_connection_internal(conn);
} else
{
- conn->last_ldap_error = ldap_rc = LDAP_SUCCESS;
+ conn->last_ldap_error = LDAP_SUCCESS;
conn->state = STATE_CONNECTED;
}
@@ -1698,6 +1695,7 @@
}
}
+#ifdef FOR_DEBUGGING
static time_t
PRTime2time_t (PRTime tm)
{
@@ -1709,6 +1707,7 @@
return (time_t)rt;
}
+#endif
static Slapi_Eq_Context
repl5_start_debug_timeout(int *setlevel)
Index: repl5_inc_protocol.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_inc_protocol.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- repl5_inc_protocol.c 10 Nov 2006 23:45:17 -0000 1.10
+++ repl5_inc_protocol.c 18 Oct 2007 00:08:31 -0000 1.11
@@ -598,8 +598,6 @@
int wait_change_timer_set = 0;
time_t last_start_time;
PRUint32 num_changes_sent;
- char *hostname = NULL;
- int portnum = 0;
/* use a different backoff timer strategy for ACQUIRE_REPLICA_BUSY errors */
PRBool use_busy_backoff_timer = PR_FALSE;
long pausetime = 0;
@@ -607,8 +605,6 @@
prp->stopped = 0;
prp->terminate = 0;
- hostname = agmt_get_hostname(prp->agmt);
- portnum = agmt_get_port(prp->agmt);
/* establish_protocol_callbacks(prp); */
done = 0;
@@ -1264,7 +1260,6 @@
current_state = next_state;
} while (!done);
- slapi_ch_free((void**)&hostname);
/* remove_protocol_callbacks(prp); */
prp->stopped = 1;
/* Cancel any linger timer that might be in effect... */
Index: repl5_plugins.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_plugins.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- repl5_plugins.c 12 Sep 2007 00:59:53 -0000 1.8
+++ repl5_plugins.c 18 Oct 2007 00:08:31 -0000 1.9
@@ -86,7 +86,6 @@
static PRBool process_operation (Slapi_PBlock *pb, const CSN *csn);
static PRBool is_mmr_replica (Slapi_PBlock *pb);
static const char *replica_get_purl_for_op (const Replica *r, Slapi_PBlock *pb, const CSN *opcsn);
-static void strip_legacy_info (slapi_operation_parameters *op_params);
/*
* XXXggood - what to do if both ssl and non-ssl ports available? How
@@ -695,12 +694,10 @@
Slapi_Operation *op;
int is_replicated_operation;
int is_fixup_operation;
- int is_legacy_operation;
slapi_pblock_get(pb, SLAPI_OPERATION, &op);
is_replicated_operation= operation_is_flag_set(op,OP_FLAG_REPLICATED);
is_fixup_operation= operation_is_flag_set(op,OP_FLAG_REPL_FIXUP);
- is_legacy_operation= operation_is_flag_set(op,OP_FLAG_LEGACY_REPLICATION_DN);
/* For replicated operations, apply URP algorithm */
if (is_replicated_operation && !is_fixup_operation)
@@ -718,12 +715,10 @@
Slapi_Operation *op;
int is_replicated_operation;
int is_fixup_operation;
- int is_legacy_operation;
slapi_pblock_get(pb, SLAPI_OPERATION, &op);
is_replicated_operation= operation_is_flag_set(op,OP_FLAG_REPLICATED);
is_fixup_operation= operation_is_flag_set(op,OP_FLAG_REPL_FIXUP);
- is_legacy_operation= operation_is_flag_set(op,OP_FLAG_LEGACY_REPLICATION_DN);
/* For replicated operations, apply URP algorithm */
if(is_replicated_operation && !is_fixup_operation)
@@ -741,12 +736,10 @@
Slapi_Operation *op;
int is_replicated_operation;
int is_fixup_operation;
- int is_legacy_operation;
slapi_pblock_get(pb, SLAPI_OPERATION, &op);
is_replicated_operation= operation_is_flag_set(op,OP_FLAG_REPLICATED);
is_fixup_operation= operation_is_flag_set(op,OP_FLAG_REPL_FIXUP);
- is_legacy_operation= operation_is_flag_set(op,OP_FLAG_LEGACY_REPLICATION_DN);
/* For replicated operations, apply URP algorithm */
if(is_replicated_operation && !is_fixup_operation)
@@ -767,12 +760,10 @@
Slapi_Operation *op;
int is_replicated_operation;
int is_fixup_operation;
- int is_legacy_operation;
slapi_pblock_get(pb, SLAPI_OPERATION, &op);
is_replicated_operation= operation_is_flag_set(op,OP_FLAG_REPLICATED);
is_fixup_operation= operation_is_flag_set(op,OP_FLAG_REPL_FIXUP);
- is_legacy_operation= operation_is_flag_set(op,OP_FLAG_LEGACY_REPLICATION_DN);
/* For replicated operations, apply URP algorithm */
if(is_replicated_operation && !is_fixup_operation)
@@ -1341,6 +1332,7 @@
return purl;
}
+#ifdef NOTUSED
/* ONREPL at the moment, I decided not to trim copiedFrom and copyingFrom
attributes when sending operation to replicas. This is because, each
operation results in a state information stored in the database and
@@ -1385,6 +1377,7 @@
default: break;
}
}
+#endif
/* this function is called when state of a backend changes */
void
@@ -1432,9 +1425,12 @@
object_release (r_obj);
}
+#ifdef NOTUSED
+/* Keeping the function just in case */
static void
close_changelog_for_replica (Object *r_obj)
{
if (cl5GetState () == CL5_STATE_OPEN)
cl5CloseDB (r_obj);
}
+#endif
Index: repl5_replica.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_replica.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- repl5_replica.c 10 Nov 2006 23:45:17 -0000 1.14
+++ repl5_replica.c 18 Oct 2007 00:08:31 -0000 1.15
@@ -3230,7 +3230,6 @@
char *current_purl = NULL;
char *p_locking_purl = NULL;
char *locking_purl = NULL;
- int junkrc;
ReplicaId junkrid;
PRBool isInc = PR_FALSE; /* get exclusive access, but not for inc update */
RUV *repl_ruv = NULL;
@@ -3255,7 +3254,7 @@
from a supplier
*/
repl_ruv = (RUV*) object_get_data (r->repl_ruv);
- junkrc = ruv_get_first_id_and_purl(repl_ruv, &junkrid, &p_locking_purl);
+ ruv_get_first_id_and_purl(repl_ruv, &junkrid, &p_locking_purl);
locking_purl = slapi_ch_strdup(p_locking_purl);
p_locking_purl = NULL;
repl_ruv = NULL;
Index: repl5_total.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_total.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- repl5_total.c 10 Nov 2006 23:45:17 -0000 1.9
+++ repl5_total.c 18 Oct 2007 00:08:31 -0000 1.10
@@ -634,7 +634,7 @@
/* The "attribute deleted" flag is next, and is optional */
if (ber_peek_tag(ber, &len) == LBER_BOOLEAN)
{
- if (ber_scanf(ber, "b", deleted) == -1)
+ if (ber_scanf(ber, "b", deleted) == LBER_DEFAULT)
{
goto loser;
}
Index: repl_controls.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl_controls.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- repl_controls.c 10 Nov 2006 23:45:17 -0000 1.8
+++ repl_controls.c 18 Oct 2007 00:08:31 -0000 1.9
@@ -229,7 +229,7 @@
if (ber_peek_tag(tmp_bere, &len) == LBER_OCTETSTRING)
{
/* The optional superior_uuid is present */
- if (ber_scanf(tmp_bere, "o", &superior_uuid_val) == -1)
+ if (ber_scanf(tmp_bere, "o", &superior_uuid_val) == LBER_DEFAULT)
{
rc = -1;
goto loser;
Index: repl_extop.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl_extop.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- repl_extop.c 10 Nov 2006 23:45:17 -0000 1.11
+++ repl_extop.c 18 Oct 2007 00:08:31 -0000 1.12
@@ -110,7 +110,6 @@
struct berval *req_data = NULL;
BerElement *tmp_bere = NULL;
int rc = 0;
- const char *csnstr = NULL;
Object *repl_obj, *ruv_obj = NULL;
Replica *repl;
RUV *ruv;
@@ -203,7 +202,7 @@
}
/* Add the CSN */
PR_ASSERT(NULL != csn);
- if (ber_printf(tmp_bere, "s", csnstr = csn_as_string(csn,PR_FALSE,s)) == -1)
+ if (ber_printf(tmp_bere, "s", csn_as_string(csn,PR_FALSE,s)) == -1)
{
rc = LDAP_ENCODING_ERROR;
goto loser;
@@ -274,7 +273,7 @@
PR_ASSERT (ber && ruv);
- if (ber_scanf(ber, "[V]", &bvals) == -1)
+ if (ber_scanf(ber, "[V]", &bvals) == LBER_DEFAULT)
{
goto done;
}
@@ -339,12 +338,12 @@
goto free_and_return;
}
/* Get the required protocol OID and root of replicated subtree */
- if (ber_get_stringa(tmp_bere, protocol_oid) == -1)
+ if (ber_get_stringa(tmp_bere, protocol_oid) == LBER_DEFAULT)
{
rc = -1;
goto free_and_return;
}
- if (ber_get_stringa(tmp_bere, repl_root) == -1)
+ if (ber_get_stringa(tmp_bere, repl_root) == LBER_DEFAULT)
{
rc = -1;
goto free_and_return;
@@ -439,18 +438,18 @@
rc = -1;
goto free_and_return;
}
- if (ber_scanf(tmp_bere, "{") == -1)
+ if (ber_scanf(tmp_bere, "{") == LBER_DEFAULT)
{
rc = -1;
goto free_and_return;
}
/* Get the required root of replicated subtree */
- if (ber_get_stringa(tmp_bere, repl_root) == -1)
+ if (ber_get_stringa(tmp_bere, repl_root) == LBER_DEFAULT)
{
rc = -1;
goto free_and_return;
}
- if (ber_scanf(tmp_bere, "}") == -1)
+ if (ber_scanf(tmp_bere, "}") == LBER_DEFAULT)
{
rc = -1;
goto free_and_return;
@@ -494,7 +493,6 @@
else
{
ber_len_t len;
- ber_tag_t tag = 0;
ber_int_t temp_response_code = 0;
*ruv_bervals = NULL;
if ((tmp_bere = ber_init(data)) == NULL)
@@ -505,7 +503,7 @@
{
return_value = -1;
}
- else if ((tag = ber_peek_tag(tmp_bere, &len)) == LBER_SEQUENCE)
+ else if (ber_peek_tag(tmp_bere, &len) == LBER_SEQUENCE)
{
if (ber_scanf(tmp_bere, "{V}}", ruv_bervals) == LBER_ERROR)
{
@@ -1034,7 +1032,6 @@
ber_int_t response;
void *conn;
consumer_connection_extension *connext = NULL;
- int rc;
int connid=-1, opid=-1;
/* Decode the extended operation */
@@ -1092,7 +1089,7 @@
if (cl5GetState () == CL5_STATE_OPEN)
{
- rc = cl5DeleteDBSync (connext->replica_acquired);
+ cl5DeleteDBSync (connext->replica_acquired);
}
replica_set_ruv (r, connext->supplier_ruv);
@@ -1140,7 +1137,6 @@
/* Send the response code */
if ((resp_bere = der_alloc()) == NULL)
{
- rc = LDAP_ENCODING_ERROR;
goto free_and_return;
}
ber_printf(resp_bere, "{e}", response);
Index: repl_monitor.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl_monitor.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- repl_monitor.c 10 Nov 2006 23:45:17 -0000 1.6
+++ repl_monitor.c 18 Oct 2007 00:08:31 -0000 1.7
@@ -46,8 +46,10 @@
#include "repl.h"
#include "slapi-plugin.h"
+#ifdef FOR_40_STYLE_CHANGELOG
/* Forward Declartions */
static int repl_monitor_search (Slapi_PBlock *pb, Slapi_Entry* e, Slapi_Entry* entryAfter, int *returncode, char *returntext, void *arg);
+#endif
int
repl_monitor_init()
@@ -58,14 +60,17 @@
if (!initialized)
{
- /* ONREPL - this is commented until we implement 4.0 style changelog
- slapi_config_register_callback(SLAPI_OPERATION_SEARCH,DSE_FLAG_PREOP,"cn=monitor",LDAP_SCOPE_BASE,"(objectclass=*)",repl_monitor_search,NULL); */
+#ifdef FOR_40_STYLE_CHANGELOG
+ /* ONREPL - this is commented until we implement 4.0 style changelog */
+ slapi_config_register_callback(SLAPI_OPERATION_SEARCH,DSE_FLAG_PREOP,"cn=monitor",LDAP_SCOPE_BASE,"(objectclass=*)",repl_monitor_search,NULL);
+#endif
initialized = 1;
}
return return_value;
}
+#ifdef FOR_40_STYLE_CHANGELOG
static int
repl_monitor_search(Slapi_PBlock *pb, Slapi_Entry* e, Slapi_Entry* entryAfter, int *returncode, char *returntext, void *arg)
{
@@ -93,4 +98,5 @@
}
return SLAPI_DSE_CALLBACK_OK;
}
+#endif
Index: replutil.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/replutil.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- replutil.c 11 Jun 2007 17:22:37 -0000 1.10
+++ replutil.c 18 Oct 2007 00:08:31 -0000 1.11
@@ -824,7 +824,6 @@
int local_backend = -1; /* index of local backend */
int chaining_backend = -1; /* index of chain backend */
PRBool local_online = PR_FALSE; /* true if the local db is online */
- PRBool chain_online = PR_FALSE; /* true if the chain db is online */
int ii;
int opid;
#ifdef DEBUG_CHAIN_ON_UPDATE
@@ -850,10 +849,6 @@
if (slapi_be_is_flag_set(be,SLAPI_BE_FLAG_REMOTE_DATA))
{
chaining_backend = ii;
- if (mtn_be_states[ii] == SLAPI_BE_STATE_ON)
- {
- chain_online = PR_TRUE;
- }
}
else
{
Index: windows_connection.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/windows_connection.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- windows_connection.c 27 Sep 2007 18:33:30 -0000 1.17
+++ windows_connection.c 18 Oct 2007 00:08:31 -0000 1.18
@@ -601,7 +601,6 @@
ConnResult return_value = 0;
int ldap_rc = 0;
LDAPMessage *res = NULL;
- int not_unique = 0;
int nummessages = 0;
int numentries = 0;
int numreferences = 0;
@@ -635,10 +634,7 @@
/* See if there are any more entries : if so then that's an error
* but we still need to get them to avoid gumming up the connection
*/
- while (NULL != ( message = ldap_next_entry(conn->ld,message)))
- {
- not_unique = 1;
- }
+ while (NULL != ( message = ldap_next_entry(conn->ld,message))) ;
return_value = CONN_OPERATION_SUCCESS;
}
else if (IS_DISCONNECT_ERROR(ldap_rc))
@@ -838,9 +834,8 @@
{
LDAPControl **returned_controls = NULL;
int code = 0;
- int parse_rc = 0;
/* Purify says this is a leak : */
- parse_rc = ldap_parse_result( conn->ld, res, &code, NULL, NULL, NULL, &returned_controls, 0 );
+ ldap_parse_result( conn->ld, res, &code, NULL, NULL, NULL, &returned_controls, 0 );
if (returned_controls)
{
windows_private_update_dirsync_control(conn->agmt, returned_controls);
@@ -1096,7 +1091,6 @@
ConnResult
windows_conn_connect(Repl_Connection *conn)
{
- int ldap_rc;
int optdata;
int secure = 0;
char* binddn = NULL;
@@ -1252,7 +1246,7 @@
}
else
{
- conn->last_ldap_error = ldap_rc = LDAP_SUCCESS;
+ conn->last_ldap_error = LDAP_SUCCESS;
conn->state = STATE_CONNECTED;
return_value = CONN_OPERATION_SUCCESS;
}
@@ -1291,7 +1285,7 @@
close_connection_internal(conn);
} else
{
- conn->last_ldap_error = ldap_rc = LDAP_SUCCESS;
+ conn->last_ldap_error = LDAP_SUCCESS;
conn->state = STATE_CONNECTED;
}
@@ -1863,22 +1857,6 @@
}
-static time_t
-PRTime2time_t (PRTime tm)
-{
- PRInt64 rt;
-
- LDAPDebug( LDAP_DEBUG_TRACE, "=> PRTime2time_t\n", 0, 0, 0 );
-
- PR_ASSERT (tm);
-
- LL_DIV(rt, tm, PR_USEC_PER_SEC);
-
- LDAPDebug( LDAP_DEBUG_TRACE, "<= PRTime2time_t\n", 0, 0, 0 );
-
- return (time_t)rt;
-}
-
static Slapi_Eq_Context
repl5_start_debug_timeout(int *setlevel)
{
Index: windows_inc_protocol.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/windows_inc_protocol.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- windows_inc_protocol.c 26 Sep 2007 05:43:34 -0000 1.14
+++ windows_inc_protocol.c 18 Oct 2007 00:08:31 -0000 1.15
@@ -277,8 +277,6 @@
int wait_change_timer_set = 0;
time_t last_start_time = 0;
PRUint32 num_changes_sent = 0;
- char *hostname = NULL;
- int portnum = 0;
/* use a different backoff timer strategy for ACQUIRE_REPLICA_BUSY errors */
PRBool use_busy_backoff_timer = PR_FALSE;
long pausetime = 0;
@@ -292,8 +290,6 @@
prp->stopped = 0;
prp->terminate = 0;
- hostname = agmt_get_hostname(prp->agmt);
- portnum = agmt_get_port(prp->agmt);
windows_private_load_dirsync_cookie(prp->agmt);
@@ -970,7 +966,6 @@
current_state = next_state;
} while (!done);
- slapi_ch_free((void**)&hostname);
/* remove_protocol_callbacks(prp); */
prp->stopped = 1;
/* Cancel any linger timer that might be in effect... */
Index: windows_private.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/windows_private.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- windows_private.c 17 Sep 2007 19:18:30 -0000 1.16
+++ windows_private.c 18 Oct 2007 00:08:31 -0000 1.17
@@ -554,7 +554,9 @@
ber_int_t hasMoreData;
ber_int_t maxAttributeCount;
BerValue *serverCookie;
+#ifdef FOR_DEBUGGING
int return_value = LDAP_SUCCESS;
+#endif
LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_private_update_dirsync_control\n", 0, 0, 0 );
@@ -572,7 +574,9 @@
if ( !foundDirsyncControl )
{
+#ifdef FOR_DEBUGGING
return_value = LDAP_CONTROL_NOT_FOUND;
+#endif
goto choke;
}
else
@@ -584,7 +588,9 @@
if (ber_scanf( ber, "{iiO}", &hasMoreData, &maxAttributeCount, &serverCookie) == LBER_ERROR)
{
+#ifdef FOR_DEBUGGING
return_value = LDAP_CONTROL_NOT_FOUND;
+#endif
goto choke;
}
@@ -603,12 +609,16 @@
}
else
{
+#ifdef FOR_DEBUGGING
return_value = LDAP_CONTROL_NOT_FOUND;
+#endif
}
-
+#ifdef FOR_DEBUGGING
+ LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_private_update_dirsync_control: rc=%d\n", return_value, 0, 0 );
+#else
LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_private_update_dirsync_control\n", 0, 0, 0 );
- /* return return_value; */
+#endif
}
PRBool windows_private_dirsync_has_more(const Repl_Agmt *ra)
Index: windows_protocol_util.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/windows_protocol_util.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- windows_protocol_util.c 16 Oct 2007 20:17:37 -0000 1.36
+++ windows_protocol_util.c 18 Oct 2007 00:08:31 -0000 1.37
@@ -58,12 +58,10 @@
int ruv_private_new( RUV **ruv, RUV *clone );
-
+#ifdef FOR_DEBUGGING
static Slapi_Entry* windows_entry_already_exists(Slapi_Entry *e);
-static void windows_dirsync_now (Private_Repl_Protocol *prp);
-static Slapi_DN* map_dn_user(Slapi_DN *sdn, int map_to, const Slapi_DN *root);
-static Slapi_DN* map_dn_group(Slapi_DN *sdn, int map_to, const Slapi_DN *root);
-static void make_mods_from_entries(Slapi_Entry *new_entry, Slapi_Entry *existing_entry, LDAPMod ***attrs);
+static void extract_guid_from_entry_bv(Slapi_Entry *e, const struct berval **bv);
+#endif
static void windows_map_mods_for_replay(Private_Repl_Protocol *prp,LDAPMod **original_mods, LDAPMod ***returned_mods, int is_user, char** password);
static int is_subject_of_agreement_local(const Slapi_Entry *local_entry,const Repl_Agmt *ra);
static int windows_create_remote_entry(Private_Repl_Protocol *prp,Slapi_Entry *original_entry, Slapi_DN *remote_sdn, Slapi_Entry **remote_entry, char** password);
@@ -395,6 +393,9 @@
original_dn_string = slapi_value_get_string(original_value);
/* Sanity check the data was a valid string */
original_dn_string_length = slapi_value_get_length(original_value);
+ if (0 == original_dn_string_length) {
+ slapi_log_error(SLAPI_LOG_REPL, NULL, "map_dn_values: length of dn is 0\n");
+ }
/* Make a sdn from the string */
original_dn = slapi_sdn_new_dn_byref(original_dn_string);
if (to_windows)
@@ -1098,9 +1099,10 @@
}
} else
{
- Slapi_Entry *remote_entry = NULL;
+ Slapi_Entry *remote_entry;
modify_fallback:
+ remote_entry = NULL;
/* Fetch the remote entry */
rc = windows_get_remote_entry(prp, remote_dn,&remote_entry);
if (0 == rc && remote_entry) {
@@ -1605,6 +1607,7 @@
return retval;
}
+#ifdef FOR_DEBUGGING
/* the entry has already been translated, so be sure to search for ntuserid
and not samaccountname or anything else. */
@@ -1632,6 +1635,7 @@
}
}
+#endif
static int
windows_delete_local_entry(Slapi_DN *sdn){
@@ -1740,13 +1744,12 @@
*/
if (0 == slapi_attr_type_cmp(mapped_type, "streetAddress", SLAPI_TYPE_CMP_SUBTYPE)) {
Slapi_Mod smod;
- struct berval *new_bval = NULL;
slapi_mod_init_byref(&smod,mod);
/* Check if there is more than one value */
if (slapi_mod_get_num_values(&smod) > 1) {
- new_bval = slapi_mod_get_first_value(&smod);
+ slapi_mod_get_first_value(&smod);
/* Remove all values except for the first */
while (slapi_mod_get_next_value(&smod)) {
/* This modifies the bvalues in the mod itself */
@@ -2315,6 +2318,7 @@
return guid;
}
+#ifdef FOR_DEBUGGING
static void
extract_guid_from_entry_bv(Slapi_Entry *e, const struct berval **bv)
{
@@ -2330,6 +2334,7 @@
}
}
}
+#endif
static char*
extract_username_from_entry(Slapi_Entry *e)
Index: windows_tot_protocol.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/windows_tot_protocol.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- windows_tot_protocol.c 26 Sep 2007 05:43:34 -0000 1.11
+++ windows_tot_protocol.c 18 Oct 2007 00:08:31 -0000 1.12
@@ -70,8 +70,8 @@
Private_Repl_Protocol *prp;
int rc;
unsigned long num_entries;
- time_t sleep_on_busy;
- time_t last_busy;
+ time_t sleep_on_busy; /* not used ??? */
+ time_t last_busy; /* not used ??? */
} callback_data;
/*
@@ -100,8 +100,6 @@
callback_data cb_data;
Slapi_PBlock *pb;
const char* dn;
- CSN *remote_schema_csn = NULL;
- PRBool cookie_has_more = PR_TRUE;
RUV *ruv = NULL;
RUV *starting_ruv = NULL;
Replica *replica = NULL;
@@ -143,7 +141,6 @@
}
agmt_set_last_init_status(prp->agmt, 0, 0, "Total schema update in progress");
- remote_schema_csn = agmt_get_consumer_schema_csn ( prp->agmt );
agmt_set_last_init_status(prp->agmt, 0, 0, "Total update in progress");
@@ -154,7 +151,6 @@
/* get everything */
windows_dirsync_inc_run(prp);
- cookie_has_more = windows_private_dirsync_has_more(prp->agmt);
windows_private_save_dirsync_cookie(prp->agmt);
@@ -350,10 +346,7 @@
{
int rc;
Private_Repl_Protocol *prp;
-
unsigned long *num_entriesp;
- time_t *sleep_on_busyp;
- time_t *last_busyp;
LDAPDebug( LDAP_DEBUG_TRACE, "=> send_entry\n", 0, 0, 0 );
@@ -361,8 +354,6 @@
prp = ((callback_data*)cb_data)->prp;
num_entriesp = &((callback_data *)cb_data)->num_entries;
- sleep_on_busyp = &((callback_data *)cb_data)->sleep_on_busy;
- last_busyp = &((callback_data *)cb_data)->last_busy;
PR_ASSERT (prp);
if (prp->terminate)
16 years, 6 months
[Fedora-directory-commits] ldapserver/ldap/servers/plugins/referint referint.c, 1.6, 1.7
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/referint
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/plugins/referint
Modified Files:
referint.c
Log Message:
Resolves: #188320
Summary: HP-UX: warnings reported by the HP-UX compiler
Index: referint.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/referint/referint.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- referint.c 10 Nov 2006 23:45:11 -0000 1.6
+++ referint.c 18 Oct 2007 00:08:31 -0000 1.7
@@ -537,19 +537,20 @@
keeprunning_cv = PR_NewCondVar(keeprunning_mutex);
keeprunning =1;
- if (( referint_tid = PR_CreateThread (PR_USER_THREAD,
+ referint_tid = PR_CreateThread (PR_USER_THREAD,
referint_thread_func,
(void *)argv,
PR_PRIORITY_NORMAL,
PR_GLOBAL_THREAD,
PR_UNJOINABLE_THREAD,
- SLAPD_DEFAULT_THREAD_STACKSIZE)) == NULL ) {
+ SLAPD_DEFAULT_THREAD_STACKSIZE);
+ if ( referint_tid == NULL ) {
slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
"referint_postop_start PR_CreateThread failed\n" );
exit( 1 );
- }
+ }
}
- } else {
+ } else {
slapi_log_error( SLAPI_LOG_FATAL, REFERINT_PLUGIN_SUBSYSTEM,
"referint_postop_start insufficient arguments supplied\n" );
return( -1 );
@@ -818,11 +819,10 @@
" line length exceeded. It will not be able"
" to update references to this entry.\n");
}else{
- PRInt32 rv;
PR_snprintf(buffer, MAX_LINE, "%s\t%s\t\n",
dn,
(newrdn != NULL) ? newrdn : "NULL");
- if ((rv = PR_Write(prfd,buffer,strlen(buffer))) < 0){
+ if (PR_Write(prfd,buffer,strlen(buffer)) < 0){
slapi_log_error(SLAPI_LOG_FATAL,REFERINT_PLUGIN_SUBSYSTEM,
" writeintegritylog: PR_Write failed : The disk"
" may be full or the file is unwritable :: NSPR error - %d\n",
16 years, 6 months
[Fedora-directory-commits] ldapserver/ldap/servers/plugins/pwdstorage md5_pwd.c, 1.2, 1.3
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/pwdstorage
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/plugins/pwdstorage
Modified Files:
md5_pwd.c
Log Message:
Resolves: #188320
Summary: HP-UX: warnings reported by the HP-UX compiler
Index: md5_pwd.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/pwdstorage/md5_pwd.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- md5_pwd.c 10 Nov 2006 23:45:10 -0000 1.2
+++ md5_pwd.c 18 Oct 2007 00:08:30 -0000 1.3
@@ -76,14 +76,14 @@
/* create the hash */
PK11_DigestBegin(ctx);
- PK11_DigestOp(ctx, userpwd, strlen(userpwd));
+ PK11_DigestOp(ctx, (const unsigned char *)userpwd, strlen(userpwd));
PK11_DigestFinal(ctx, hash_out, &outLen, sizeof hash_out);
PK11_DestroyContext(ctx, 1);
/* convert the binary hash to base64 */
binary_item.data = hash_out;
binary_item.len = outLen;
- bver = NSSBase64_EncodeItem(NULL, b2a_out, sizeof b2a_out, &binary_item);
+ bver = NSSBase64_EncodeItem(NULL, (char *)b2a_out, sizeof b2a_out, &binary_item);
/* bver points to b2a_out upon success */
if (bver) {
rc = strcmp(bver,dbpwd);
@@ -114,14 +114,14 @@
/* create the hash */
PK11_DigestBegin(ctx);
- PK11_DigestOp(ctx, pwd, strlen(pwd));
+ PK11_DigestOp(ctx, (const unsigned char *)pwd, strlen(pwd));
PK11_DigestFinal(ctx, hash_out, &outLen, sizeof hash_out);
PK11_DestroyContext(ctx, 1);
/* convert the binary hash to base64 */
binary_item.data = hash_out;
binary_item.len = outLen;
- bver = NSSBase64_EncodeItem(NULL, b2a_out, sizeof b2a_out, &binary_item);
+ bver = NSSBase64_EncodeItem(NULL, (char *)b2a_out, sizeof b2a_out, &binary_item);
if (bver) {
enc = slapi_ch_smprintf("%c%s%c%s", PWD_HASH_PREFIX_START, MD5_SCHEME_NAME,
PWD_HASH_PREFIX_END, bver );
16 years, 6 months
[Fedora-directory-commits] ldapserver/ldap/servers/plugins/pam_passthru pam_ptconfig.c, 1.9, 1.10 pam_ptimpl.c, 1.10, 1.11
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/pam_passthru
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/plugins/pam_passthru
Modified Files:
pam_ptconfig.c pam_ptimpl.c
Log Message:
Resolves: #188320
Summary: HP-UX: warnings reported by the HP-UX compiler
Index: pam_ptconfig.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/pam_passthru/pam_ptconfig.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- pam_ptconfig.c 15 Mar 2007 18:21:37 -0000 1.9
+++ pam_ptconfig.c 18 Oct 2007 00:08:30 -0000 1.10
@@ -231,7 +231,6 @@
parse_map_method(char *map_method, int *one, int *two, int *three, char *returntext)
{
int err = LDAP_SUCCESS;
- int extra;
char **ptr = &map_method;
*one = *two = *three = PAMPT_MAP_METHOD_NONE;
@@ -256,7 +255,7 @@
"one of %s", map_method, get_map_method_values());
return LDAP_UNWILLING_TO_PERFORM;
}
- if (((extra = meth_to_int(ptr, &err)) != PAMPT_MAP_METHOD_NONE) ||
+ if ((meth_to_int(ptr, &err) != PAMPT_MAP_METHOD_NONE) ||
err) {
PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE,
"Invalid extra text [%s] after last map method",
Index: pam_ptimpl.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/pam_passthru/pam_ptimpl.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- pam_ptimpl.c 10 Nov 2006 23:45:03 -0000 1.10
+++ pam_ptimpl.c 18 Oct 2007 00:08:30 -0000 1.11
@@ -177,7 +177,7 @@
* tell if this is actually the case.
*/
static int
-pam_conv_func(int num_msg, const struct pam_message **msg, struct pam_response **resp, void *mydata)
+pam_conv_func(int num_msg, struct pam_message **msg, struct pam_response **resp, void *mydata)
{
int ii;
struct berval *creds;
16 years, 6 months
[Fedora-directory-commits] ldapserver/ldap/servers/plugins/http http_impl.c, 1.10, 1.11
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/http
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/plugins/http
Modified Files:
http_impl.c
Log Message:
Resolves: #188320
Summary: HP-UX: warnings reported by the HP-UX compiler
Index: http_impl.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/http/http_impl.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- http_impl.c 10 Nov 2006 23:45:02 -0000 1.10
+++ http_impl.c 18 Oct 2007 00:08:30 -0000 1.11
@@ -57,6 +57,7 @@
#include "http_client.h"
#include "secerr.h"
#include "sslerr.h"
+#include "slap.h"
#include "slapi-private.h"
#include "slapi-plugin-compat4.h"
/* get file mode flags for unix */
16 years, 6 months
[Fedora-directory-commits] ldapserver/ldap/servers/plugins/dna dna.c, 1.1, 1.2
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/dna
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/plugins/dna
Modified Files:
dna.c
Log Message:
Resolves: #188320
Summary: HP-UX: warnings reported by the HP-UX compiler
Index: dna.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/dna/dna.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- dna.c 31 Jan 2007 22:49:25 -0000 1.1
+++ dna.c 18 Oct 2007 00:08:28 -0000 1.2
@@ -962,8 +962,8 @@
e, config_entry->type);
if((value &&
!slapi_utf8casecmp(
- config_entry->generate,
- value)) ||
+ (unsigned char *)config_entry->generate,
+ (unsigned char *)value)) ||
0 == value)
{
generate = 1;
@@ -996,8 +996,8 @@
if(len == bv->bv_len)
{
if(!slapi_utf8ncasecmp(
- bv->bv_val,
- config_entry->
+ (unsigned char *)bv->bv_val,
+ (unsigned char *)config_entry->
generate,
len))
@@ -1128,7 +1128,6 @@
loadPluginConfig();
}
-bail:
slapi_log_error( SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM , "<-- dna_config_check_post_op\n");
return 0;
@@ -1165,11 +1164,14 @@
void dnaDumpConfigEntry(configEntry *entry)
{
+ char buffer[BUFSIZ];
+ size_t bufsiz = (size_t)sizeof(buffer);
printf("<- type --------------> %s\n", entry->type);
printf("<---- prefix ---------> %s\n", entry->prefix);
printf("<---- next value -----> %lu\n", entry->nextval);
printf("<---- interval -------> %lu\n", entry->interval);
- printf("<---- filter ---------> %s\n", entry->filter);
+ printf("<---- filter ---------> %s\n",
+ slapi_filter_to_string_internal((const struct slapi_filter *)entry->filter, buffer, &bufsiz));
printf("<---- generate flag --> %s\n", entry->generate);
}
16 years, 6 months
[Fedora-directory-commits] ldapserver/ldap/servers/plugins/chainingdb cb_conn_stateless.c, 1.6, 1.7 cb_instance.c, 1.7, 1.8 cb_test.c, 1.6, 1.7
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/chainingdb
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/plugins/chainingdb
Modified Files:
cb_conn_stateless.c cb_instance.c cb_test.c
Log Message:
Resolves: #188320
Summary: HP-UX: warnings reported by the HP-UX compiler
Index: cb_conn_stateless.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/chainingdb/cb_conn_stateless.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- cb_conn_stateless.c 10 Nov 2006 23:44:50 -0000 1.6
+++ cb_conn_stateless.c 18 Oct 2007 00:08:28 -0000 1.7
@@ -886,141 +886,6 @@
}
-
-/**************************************************************************/
-/* Need to use our own connect function until we've switched to C-SDK 4.1 */
-/* to have a timeout in the connect system call. */
-/**************************************************************************/
-
-static int global_connect_to;
-
-#if 0
-
-/* Taken from C-SDK 4.1 */
-#include <fcntl.h>
-#include <errno.h>
-#define LDAP_X_IO_TIMEOUT_NO_TIMEOUT (-1)
-
-static int
-nsldapi_os_connect_with_to(LBER_SOCKET sockfd, struct sockaddr *saptr,
- int salen)
-{
-#ifndef _WIN32
- int flags;
-#endif /* _WIN32 */
- int n, error;
- int len;
- fd_set rset, wset;
- struct timeval tval;
-#ifdef _WIN32
- int nonblock = 1;
- int block = 0;
- fd_set eset;
-#endif /* _WIN32 */
-
- int msec=global_connect_to; /* global */
-
-#ifdef _WIN32
- ioctlsocket(sockfd, FIONBIO, &nonblock);
-#else
- flags = fcntl(sockfd, F_GETFL, 0);
- fcntl(sockfd, F_SETFL, flags | O_NONBLOCK);
-#endif /* _WIN32 */
-
- error = 0;
- if ((n = connect(sockfd, saptr, salen)) < 0)
-#ifdef _WIN32
- if ((n != SOCKET_ERROR) && (WSAGetLastError() != WSAEWOULDBLOCK)) {
-#else
- if (errno != EINPROGRESS) {
-#endif /* _WIN32 */
- return (-1);
- }
-
- /* success */
- if (n == 0)
- goto done;
-
- FD_ZERO(&rset);
- FD_SET(sockfd, &rset);
- wset = rset;
-
-#ifdef _WIN32
- eset = rset;
-#endif /* _WIN32 */
-
- if (msec < 0 && msec != LDAP_X_IO_TIMEOUT_NO_TIMEOUT) {
- msec = LDAP_X_IO_TIMEOUT_NO_TIMEOUT;
- } else {
- if (msec != 0)
- tval.tv_sec = msec / 1000;
- else
- tval.tv_sec = 0;
- tval.tv_usec = 0;
- }
-
- /* if timeval structure == NULL, select will block indefinitely */
- /* != NULL, and value == 0, select will */
- /* not block */
- /* Windows is a bit quirky on how it behaves w.r.t nonblocking */
- /* connects. If the connect fails, the exception fd, eset, is */
- /* set to show the failure. The first argument in select is */
- /* ignored */
-
-#ifdef _WIN32
- if ((n = select(sockfd +1, &rset, &wset, &eset,
- (msec != LDAP_X_IO_TIMEOUT_NO_TIMEOUT) ? &tval : NULL)) == 0) {
- errno = WSAETIMEDOUT;
- return (-1);
- }
- /* if wset is set, the connect worked */
- if (FD_ISSET(sockfd, &wset) || FD_ISSET(sockfd, &rset)) {
- len = sizeof(error);
- if (getsockopt(sockfd, SOL_SOCKET, SO_ERROR, (char *)&error, &len)
- < 0)
- return (-1);
- goto done;
- }
-
- /* if eset is set, the connect failed */
- if (FD_ISSET(sockfd, &eset)) {
- return (-1);
- }
-
- /* failure on select call */
- if (n == SOCKET_ERROR) {
- return (-1);
- }
-#else
- if ((n = select(sockfd +1, &rset, &wset, NULL,
- (msec != LDAP_X_IO_TIMEOUT_NO_TIMEOUT) ? &tval : NULL)) == 0) {
- errno = ETIMEDOUT;
- return (-1);
- }
- if (FD_ISSET(sockfd, &rset) || FD_ISSET(sockfd, &wset)) {
- len = sizeof(error);
- if (getsockopt(sockfd, SOL_SOCKET, SO_ERROR, (char *)&error, &len)
- < 0)
- return (-1);
- }
-#endif /* _WIN32 */
-done:
-#ifdef _WIN32
- ioctlsocket(sockfd, FIONBIO, &block);
-#else
- fcntl(sockfd, F_SETFL, flags);
-#endif /* _WIN32 */
-
- if (error) {
- errno = error;
- return (-1);
- }
-
- return (0);
-}
-
-#endif
-
/* Try to figure out if a farm server is still alive */
int cb_ping_farm(cb_backend_instance *cb, cb_outgoing_conn * cnx,time_t end_time) {
@@ -1030,9 +895,6 @@
struct timeval timeout;
LDAP *ld;
LDAPMessage *result;
-#if 0
- struct ldap_io_fns iof;
-#endif
time_t now;
if (cb->max_idle_time <=0) /* Heart-beat disabled */
return LDAP_SUCCESS;
@@ -1049,27 +911,9 @@
return LDAP_SERVER_DOWN;
}
-#if 0
- memset(&iof,0,sizeof(struct ldap_io_fns));
- if (LDAP_SUCCESS !=ldap_get_option(ld,LDAP_OPT_IO_FN_PTRS,&iof)) {
- slapi_ldap_unbind( ld );
- cb_update_failed_conn_cpt( cb );
- return LDAP_SERVER_DOWN;
- }
-
- iof.liof_connect = nsldapi_os_connect_with_to;
- if (LDAP_SUCCESS !=ldap_set_option(ld,LDAP_OPT_IO_FN_PTRS,&iof)) {
- slapi_ldap_unbind( ld );
- cb_update_failed_conn_cpt( cb );
- return LDAP_SERVER_DOWN;
- }
-
-#endif
-
timeout.tv_sec=cb->max_test_time;
timeout.tv_usec=0;
- global_connect_to=cb->max_test_time * 1000; /* Reuse the same for the connect */
rc=ldap_search_ext_s(ld ,NULL,LDAP_SCOPE_BASE,"objectclass=*",attrs,1,NULL,
NULL, &timeout, 1,&result);
if ( LDAP_SUCCESS != rc ) {
@@ -1122,7 +966,6 @@
int cb_check_availability( cb_backend_instance *cb, Slapi_PBlock *pb ) {
/* check wether the farmserver is available or not */
- int rc ;
time_t now ;
if ( cb->monitor_availability.farmserver_state == FARMSERVER_UNAVAILABLE ){
slapi_lock_mutex(cb->monitor_availability.lock_timeLimit);
@@ -1138,7 +981,7 @@
}
slapi_log_error( SLAPI_LOG_PLUGIN, CB_PLUGIN_SUBSYSTEM,
"cb_check_availability: ping the farm server and check if it's still unavailable");
- if ((rc = cb_ping_farm(cb, NULL, 0)) != LDAP_SUCCESS) { /* farm still unavailable... Just change the timelimit */
+ if (cb_ping_farm(cb, NULL, 0) != LDAP_SUCCESS) { /* farm still unavailable... Just change the timelimit */
slapi_lock_mutex(cb->monitor_availability.lock_timeLimit);
now = current_time();
cb->monitor_availability.unavailableTimeLimit = now + CB_UNAVAILABLE_PERIOD ;
Index: cb_instance.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/chainingdb/cb_instance.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- cb_instance.c 10 Nov 2006 23:44:50 -0000 1.7
+++ cb_instance.c 18 Oct 2007 00:08:28 -0000 1.8
@@ -716,8 +716,6 @@
if (apply) {
- char * ptr;
-
PR_RWLock_Wlock(inst->rwl_config_lock);
if (( phase != CB_CONFIG_PHASE_INITIALIZATION ) &&
@@ -771,7 +769,7 @@
while (aHostName) {
char * aHostPort;
- if ( NULL == ( ptr=strstr(aHostName,":"))) {
+ if ( NULL == strstr(aHostName,":")) {
aHostPort = slapi_ch_smprintf("%s://%s:%d/",
inst->pool->secure ? "ldaps" : "ldap",
aHostName,inst->pool->port);
Index: cb_test.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/chainingdb/cb_test.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- cb_test.c 10 Nov 2006 23:44:50 -0000 1.6
+++ cb_test.c 18 Oct 2007 00:08:28 -0000 1.7
@@ -46,7 +46,7 @@
{
Slapi_Backend * be;
- cb_backend * cb;
+ cb_backend * cb;
cb_backend_instance * inst;
Slapi_PBlock * apb;
int res;
@@ -56,9 +56,9 @@
char * theTarget;
- slapi_pblock_get( pb, SLAPI_PLUGIN_PRIVATE, &cb );
- slapi_pblock_get( pb, SLAPI_BACKEND, &be );
- inst = cb_get_instance(be);
+ slapi_pblock_get( pb, SLAPI_PLUGIN_PRIVATE, &cb );
+ slapi_pblock_get( pb, SLAPI_BACKEND, &be );
+ inst = cb_get_instance(be);
apb = slapi_pblock_new();
/*
@@ -70,16 +70,16 @@
printf("Begin test instance %s.\n",inst->inst_name);
- aSuffix = slapi_be_getsuffix(be,0);
- aSuffixString=slapi_sdn_get_dn(aSuffix);
- /* Remove leading white spaces */
- for (aSuffixString; *aSuffixString==' ';aSuffixString++) {}
+ aSuffix = slapi_be_getsuffix(be,0);
+ /* Remove leading white spaces */
+ for (aSuffixString=slapi_sdn_get_dn(aSuffix);
+ *aSuffixString==' '; aSuffixString++) {}
theTarget=slapi_ch_smprintf("cn=test,%s",aSuffixString);
/* XXXSD make sure chaining allowed for this plugin... */
- slapi_search_internal_set_pb (apb, theTarget, LDAP_SCOPE_BASE, "objectclass=*", NULL, 0, NULL, NULL,
+ slapi_search_internal_set_pb (apb, theTarget, LDAP_SCOPE_BASE, "objectclass=*", NULL, 0, NULL, NULL,
cb->identity,0 );
- slapi_search_internal_pb (apb);
+ slapi_search_internal_pb (apb);
slapi_ch_free((void **)&theTarget);
@@ -91,22 +91,22 @@
slapi_pblock_get(apb, SLAPI_PLUGIN_INTOP_RESULT, &res);
/* OPERATIONS ERRORS also returned when bind failed */
- if (CB_LDAP_CONN_ERROR(res) || (res==LDAP_OPERATIONS_ERROR ))
- {
+ if (CB_LDAP_CONN_ERROR(res) || (res==LDAP_OPERATIONS_ERROR ))
+ {
printf("Can't contact the remote farm server %s. (%s).\n",inst->pool->hostname,ldap_err2string(res));
rc=-1;
goto the_end;
- } else {
+ } else {
printf("Connection established with the remote farm server %s.\n",inst->pool->hostname);
}
the_end:
- if (apb)
- {
- slapi_free_search_results_internal(apb);
- slapi_pblock_destroy (apb);
- }
-
- return rc;
+ if (apb)
+ {
+ slapi_free_search_results_internal(apb);
+ slapi_pblock_destroy (apb);
+ }
+
+ return rc;
}
16 years, 6 months
[Fedora-directory-commits] ldapserver/ldap/servers/plugins/cos cos_cache.c, 1.8, 1.9
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/cos
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/plugins/cos
Modified Files:
cos_cache.c
Log Message:
Resolves: #188320
Summary: HP-UX: warnings reported by the HP-UX compiler
Index: cos_cache.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/cos/cos_cache.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- cos_cache.c 12 Oct 2007 18:03:43 -0000 1.8
+++ cos_cache.c 18 Oct 2007 00:08:28 -0000 1.9
@@ -284,7 +284,6 @@
/* cosAttrValue manipulation */
static int cos_cache_add_attrval(cosAttrValue **attrval, char *val);
static void cos_cache_del_attrval_list(cosAttrValue **pVal);
-static int cos_cache_attrval_count(cosAttrValue *pVal);
static int cos_cache_attrval_exists(cosAttrValue *pAttrs, const char *val);
/* cosAttributes manipulation */
@@ -298,18 +297,12 @@
/* cosTemplates manipulation */
static int cos_cache_add_dn_tmpls(char *dn, cosAttrValue *pCosSpecifier, cosAttrValue *pAttrs, cosTemplates **pTmpls);
static int cos_cache_add_tmpl(cosTemplates **pTemplates, cosAttrValue *dn, cosAttrValue *objclasses, cosAttrValue *pCosSpecifier, cosAttributes *pAttrs,cosAttrValue *cosPriority);
-#if 0
-static int cos_cache_del_tmpl(cosTemplates *pTemplates, char *dn);
-#endif
/* cosDefinitions manipulation */
static int cos_cache_build_definition_list(cosDefinitions **pDefs, int *vattr_cacheable);
static int cos_cache_add_dn_defs(char *dn, cosDefinitions **pDefs, int *vattr_cacheable);
static int cos_cache_add_defn(cosDefinitions **pDefs, cosAttrValue **dn, int cosType, cosAttrValue **tree, cosAttrValue **tmpDn, cosAttrValue **spec, cosAttrValue **pAttrs, cosAttrValue **pOverrides, cosAttrValue **pOperational, cosAttrValue **pCosMerge, cosAttrValue **pCosOpDefault);
static int cos_cache_entry_is_cos_related( Slapi_Entry *e);
-#if 0
-static int cos_cache_del_defn(cosDefinitions *pDefs, char *dn);
-#endif
/* schema checking */
static int cos_cache_schema_check(cosCache *pCache, int cache_attr_index, Slapi_Attr *pObjclasses);
@@ -332,8 +325,6 @@
static int cos_cache_vattr_compare(vattr_sp_handle *handle, vattr_context *c, Slapi_Entry *e, char *type, Slapi_Value *test_this, int* result, int flags, void *hint);
static int cos_cache_vattr_types(vattr_sp_handle *handle,Slapi_Entry *e,vattr_type_list_context *type_context,int flags);
static int cos_cache_query_attr(cos_cache *ptheCache, vattr_context *context, Slapi_Entry *e, char *type, Slapi_ValueSet **out_attr, Slapi_Value *test_this, int *result, int *ops);
-static void cos_cache_query_attr_free(struct berval ***vals); /* deprecated */
-
/*
compares s2 to s1 starting from end of string until the beginning of either
@@ -344,7 +335,6 @@
/* module level thread control stuff */
-static PRThread *cos_tid = NULL;
static int keeprunning = 0;
static int started = 0;
@@ -411,18 +401,18 @@
goto out;
}
- if ((cos_tid = PR_CreateThread (PR_USER_THREAD,
+ if ( PR_CreateThread (PR_USER_THREAD,
cos_cache_wait_on_change,
NULL,
PR_PRIORITY_NORMAL,
PR_GLOBAL_THREAD,
PR_UNJOINABLE_THREAD,
- SLAPD_DEFAULT_THREAD_STACKSIZE)) == NULL )
+ SLAPD_DEFAULT_THREAD_STACKSIZE) == NULL )
{
slapi_log_error( SLAPI_LOG_FATAL, COS_PLUGIN_SUBSYSTEM,
"cos_cache_init: PR_CreateThread failed\n" );
ret = -1;
- goto out;
+ goto out;
}
/* wait for that thread to get started */
@@ -794,14 +784,6 @@
int valIndex = 0;
Slapi_Attr *dnAttr;
char *attrType = 0;
- char *attrs[7];
-
- attrs[0] = "objectclass";
- attrs[1] = "cosTargetTree";
- attrs[2] = "cosTemplateDn";
- attrs[3] = "cosSpecifier";
- attrs[4] = "cosAttribute";
- attrs[5] = 0;
info=(struct dn_defs_info *)callback_data;
@@ -849,7 +831,6 @@
*/
if(pSneakyVal == &pCosAttribute)
{
- cosAttrValue *pTmpTargetTree = 0;
int qualifier_hit = 0;
int op_qualifier_hit = 0;
int merge_schemes_qualifier_hit = 0;
@@ -935,8 +916,6 @@
slapi_ch_free((void**)&parent);
}
- pTmpTargetTree = pCosTargetTree;
-
slapi_vattrspi_regattr((vattr_sp_handle *)vattr_handle, dnVals[valIndex]->bv_val, NULL, NULL);
} /* if(attrType is cosAttribute) */
@@ -1821,27 +1800,6 @@
return ret;
}
-/*
- cos_cache_attrval_count
- -----------------------
- counts the number of values in the list
-*/
-
-static int cos_cache_attrval_count(cosAttrValue *pVal)
-{
- int ret = 0;
-
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_attrval_count\n",0,0,0);
-
- while(pVal)
- {
- ret++;
- pVal = pVal->list.pNext;
- }
-
- LDAPDebug( LDAP_DEBUG_TRACE, "<-- cos_cache_attrval_count\n",0,0,0);
- return ret;
-}
/*
cos_cache_del_attr_list
@@ -1875,7 +1833,6 @@
static void cos_cache_del_schema(cosCache *pCache)
{
char *pLastName = 0;
- cosAttrValue *pLastRef = 0;
int attr_index = 0;
LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_del_schema\n",0,0,0);
@@ -1883,7 +1840,6 @@
if(pCache && pCache->attrCount && pCache->ppAttrIndex)
{
pLastName = pCache->ppAttrIndex[0]->pAttrName;
- pLastRef = pCache->ppAttrIndex[0]->pObjectclasses;
for(attr_index=1; attr_index<pCache->attrCount; attr_index++)
{
@@ -2578,25 +2534,6 @@
}
/*
- cos_cache_query_attr_free
- -------------------------
- frees the memory allocated for the data returned
- by cos_cache_query_attr
-*/
-static void cos_cache_query_attr_free(struct berval ***vals)
-{
- int index = 0;
-
- while((*vals)[index])
- {
- slapi_ch_free((void**)&((*vals)[index]));
- index++;
- }
-
- slapi_ch_free((void**)*vals);
-}
-
-/*
cos_cache_find_attr
-------------------
searches for the attribute "type", and if found returns the index
@@ -3006,19 +2943,6 @@
}
-/*
- cos_cache_XXX_compare
- ---------------------
- this set of functions are passed to sorting and searching
- functions to provide an ordering comparison between to structures
-*/
-#if 0
-int cos_cache_attrval_compare(const void *e1, const void *e2)
-{
- return slapi_utf8casecmp((unsigned char*)(*(cosAttrValue**)e1)->val,(unsigned char*)(*(cosAttrValue**)e2)->val);
-}
-#endif
-
static int cos_cache_attr_compare(const void *e1, const void *e2)
{
int com_Result;
@@ -3045,13 +2969,6 @@
return com_Result;
}
-#if 0
-int cos_cache_tmpl_compare(const void *e1, const void *e2)
-{
- return slapi_utf8casecmp((unsigned char*)(*(cosTemplates**)e1)->cosGrade,(unsigned char*)(*(cosTemplates**)e2)->cosGrade);
-}
-#endif
-
static int cos_cache_string_compare(const void *e1, const void *e2)
{
return slapi_utf8casecmp((*(unsigned char**)e1),(*(unsigned char**)e2));
16 years, 6 months