diff options
Diffstat (limited to 'ldap/servers/plugins/retrocl')
-rw-r--r-- | ldap/servers/plugins/retrocl/retrocl.c | 6 | ||||
-rw-r--r-- | ldap/servers/plugins/retrocl/retrocl_cn.c | 4 | ||||
-rw-r--r-- | ldap/servers/plugins/retrocl/retrocl_po.c | 19 | ||||
-rw-r--r-- | ldap/servers/plugins/retrocl/retrocl_trim.c | 16 |
4 files changed, 21 insertions, 24 deletions
diff --git a/ldap/servers/plugins/retrocl/retrocl.c b/ldap/servers/plugins/retrocl/retrocl.c index bda04a65..58edc072 100644 --- a/ldap/servers/plugins/retrocl/retrocl.c +++ b/ldap/servers/plugins/retrocl/retrocl.c @@ -221,8 +221,8 @@ static int retrocl_select_backend(void) operation_free(&op,NULL); if (err != LDAP_SUCCESS || be == NULL || be == defbackend_get_backend()) { - LDAPDebug(LDAP_DEBUG_TRACE,"Mapping tree select failed (%d) %s.\n", - err,errbuf,0); + LDAPDebug2Args(LDAP_DEBUG_TRACE,"Mapping tree select failed (%d) %s.\n", + err,errbuf); /* could not find the backend for cn=changelog, either because * it doesn't exist @@ -307,7 +307,7 @@ static int retrocl_start (Slapi_PBlock *pb) if (rc == 0) { retrocl_init_trimming(); } else { - LDAPDebug(LDAP_DEBUG_TRACE,"Couldnt find backend, not trimming retro changelog (%d).\n",rc,0,0); + LDAPDebug1Arg(LDAP_DEBUG_TRACE,"Couldnt find backend, not trimming retro changelog (%d).\n",rc); } } diff --git a/ldap/servers/plugins/retrocl/retrocl_cn.c b/ldap/servers/plugins/retrocl/retrocl_cn.c index 9145bd91..00dc9b57 100644 --- a/ldap/servers/plugins/retrocl/retrocl_cn.c +++ b/ldap/servers/plugins/retrocl/retrocl_cn.c @@ -181,7 +181,7 @@ int retrocl_get_changenumbers(void) retrocl_internal_cn = cr.cr_cnum; - slapi_log_error(SLAPI_LOG_PLUGIN,"retrocl","Got changenumbers %d and %d\n", + slapi_log_error(SLAPI_LOG_PLUGIN,"retrocl","Got changenumbers %lu and %lu\n", retrocl_first_cn, retrocl_internal_cn); @@ -379,7 +379,7 @@ int retrocl_update_lastchangenumber(void) retrocl_internal_cn = cr.cr_cnum; - slapi_log_error(SLAPI_LOG_PLUGIN,"retrocl","Refetched last changenumber = %d \n", + slapi_log_error(SLAPI_LOG_PLUGIN,"retrocl","Refetched last changenumber = %lu \n", retrocl_internal_cn); slapi_ch_free(( void **) &cr.cr_time ); diff --git a/ldap/servers/plugins/retrocl/retrocl_po.c b/ldap/servers/plugins/retrocl/retrocl_po.c index e368ad98..d9844b83 100644 --- a/ldap/servers/plugins/retrocl/retrocl_po.c +++ b/ldap/servers/plugins/retrocl/retrocl_po.c @@ -179,7 +179,7 @@ write_replog_db( PR_ASSERT( changenum > 0UL ); slapi_log_error( SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME, - "write_replog_db: write change record %d for dn: \"%s\"\n", + "write_replog_db: write change record %lu for dn: \"%s\"\n", changenum, ( dn == NULL ) ? "NULL" : dn ); /* Construct the dn of this change record */ @@ -271,7 +271,7 @@ write_replog_db( if ( 0 != rc ) { slapi_log_error( SLAPI_LOG_FATAL, RETROCL_PLUGIN_NAME, "replog: an error occured while adding change " - "number %d, dn = %s: %s. \n", + "number %lu, dn = %s: %s. \n", changenum, edn, ldap_err2string( rc )); retrocl_release_changenumber(); } else { @@ -484,27 +484,24 @@ int retrocl_postob (Slapi_PBlock *pb,int optype) (void)slapi_pblock_get( pb, SLAPI_BACKEND, &be ); if (slapi_be_logchanges(be) == 0) { - LDAPDebug(LDAP_DEBUG_TRACE,"not applying change if not logging\n", - 0,0,0); + LDAPDebug0Args(LDAP_DEBUG_TRACE,"not applying change if not logging\n"); return 0; } if (retrocl_be_changelog == NULL || be == retrocl_be_changelog) { - LDAPDebug(LDAP_DEBUG_TRACE,"not applying change if no/cl be\n",0,0,0); + LDAPDebug0Args(LDAP_DEBUG_TRACE,"not applying change if no/cl be\n"); return 0; } slapi_pblock_get(pb, SLAPI_RESULT_CODE, &rc); if (rc != LDAP_SUCCESS) { - LDAPDebug(LDAP_DEBUG_TRACE,"not applying change if op failed %d\n",rc, - 0,0); + LDAPDebug1Arg(LDAP_DEBUG_TRACE,"not applying change if op failed %d\n",rc); return 0; } if (slapi_op_abandoned(pb)) { - LDAPDebug(LDAP_DEBUG_PLUGIN,"not applying change if op abandoned\n", - 0,0,0); + LDAPDebug0Args(LDAP_DEBUG_PLUGIN,"not applying change if op abandoned\n"); return 0; } @@ -519,12 +516,12 @@ int retrocl_postob (Slapi_PBlock *pb,int optype) slapi_pblock_get( pb, SLAPI_OPERATION, &op ); if (op == NULL) { - LDAPDebug(LDAP_DEBUG_TRACE,"not applying change if no op\n",0,0,0); + LDAPDebug0Args(LDAP_DEBUG_TRACE,"not applying change if no op\n"); return 0; } if (operation_is_flag_set(op, OP_FLAG_TOMBSTONE_ENTRY)){ - LDAPDebug(LDAP_DEBUG_TRACE,"not applying change for nsTombstone entries\n",0,0,0); + LDAPDebug0Args(LDAP_DEBUG_TRACE,"not applying change for nsTombstone entries\n"); return 0; } diff --git a/ldap/servers/plugins/retrocl/retrocl_trim.c b/ldap/servers/plugins/retrocl/retrocl_trim.c index b43415d1..e16049d8 100644 --- a/ldap/servers/plugins/retrocl/retrocl_trim.c +++ b/ldap/servers/plugins/retrocl/retrocl_trim.c @@ -119,7 +119,7 @@ delete_changerecord( changeNumber cnum ) if ( delrc != LDAP_SUCCESS ) { slapi_log_error( SLAPI_LOG_FATAL, RETROCL_PLUGIN_NAME, "delete_changerecord: could not delete " - "change record %d\n", cnum ); + "change record %lu\n", cnum ); } else { slapi_log_error( SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME, "delete_changerecord: deleted changelog entry \"%s\"\n", dnbuf); @@ -312,7 +312,7 @@ static int trim_changelog(void) } } } else { - LDAPDebug(LDAP_DEBUG_PLUGIN, "not yet time to trim: %d < (%d+%d)\n", + LDAPDebug(LDAP_DEBUG_PLUGIN, "not yet time to trim: %ld < (%d+%d)\n", now,lt,(CHANGELOGDB_TRIM_INTERVAL/1000)); } PR_Lock( ts.ts_s_trim_mutex ); @@ -366,7 +366,7 @@ void retrocl_housekeeping ( time_t cur_time, void *noarg ) int ldrc; if (retrocl_be_changelog == NULL) { - LDAPDebug(LDAP_DEBUG_TRACE,"not housekeeping if no cl be\n",0,0,0); + LDAPDebug0Args(LDAP_DEBUG_TRACE,"not housekeeping if no cl be\n"); return; } @@ -391,7 +391,7 @@ void retrocl_housekeeping ( time_t cur_time, void *noarg ) */ first_time = retrocl_getchangetime( SLAPI_SEQ_FIRST, &ldrc ); LDAPDebug(LDAP_DEBUG_PLUGIN, - "cltrim: ldrc=%d, first_time=%d, cur_time=%d\n", + "cltrim: ldrc=%d, first_time=%ld, cur_time=%ld\n", ldrc,first_time,cur_time); if ( LDAP_SUCCESS == ldrc && first_time > (time_t) 0L && first_time + ts.ts_c_max_age < cur_time ) { @@ -399,7 +399,7 @@ void retrocl_housekeeping ( time_t cur_time, void *noarg ) } } if ( must_trim ) { - LDAPDebug(LDAP_DEBUG_TRACE,"changelog about to create thread\n",0,0,0); + LDAPDebug0Args(LDAP_DEBUG_TRACE,"changelog about to create thread\n"); /* Start a thread to trim the changelog */ ts.ts_s_trimming = 1; if ( PR_CreateThread( PR_USER_THREAD, @@ -409,8 +409,8 @@ void retrocl_housekeeping ( time_t cur_time, void *noarg ) slapi_log_error( SLAPI_LOG_FATAL, RETROCL_PLUGIN_NAME, "unable to create changelog trimming thread\n" ); } } else { - LDAPDebug(LDAP_DEBUG_PLUGIN, - "changelog does not need to be trimmed\n",0,0,0); + LDAPDebug0Args(LDAP_DEBUG_PLUGIN, + "changelog does not need to be trimmed\n"); } } PR_Unlock( ts.ts_s_trim_mutex ); @@ -491,7 +491,7 @@ void retrocl_init_trimming (void) cl_maxage = retrocl_get_config_str(CONFIG_CHANGELOG_MAXAGE_ATTRIBUTE); if (cl_maxage == NULL) { - LDAPDebug(LDAP_DEBUG_TRACE,"No maxage, not trimming retro changelog.\n",0,0,0); + LDAPDebug0Args(LDAP_DEBUG_TRACE,"No maxage, not trimming retro changelog.\n"); return; } ageval = age_str2time (cl_maxage); |