diff options
author | Nathan Kinder <nkinder@redhat.com> | 2006-09-01 21:25:14 +0000 |
---|---|---|
committer | Nathan Kinder <nkinder@redhat.com> | 2006-09-01 21:25:14 +0000 |
commit | 0c389297612bdc3818f27a05116d7a00609d94c2 (patch) | |
tree | 176fe2efefe3251f13942af22b008bee97f9f65a | |
parent | a656383901931edb24e5c3e4943931b0acff0a9c (diff) | |
download | ds-0c389297612bdc3818f27a05116d7a00609d94c2.tar.gz ds-0c389297612bdc3818f27a05116d7a00609d94c2.tar.xz ds-0c389297612bdc3818f27a05116d7a00609d94c2.zip |
204517 - Cleaned up usage of ber_printf to use new ber types
-rw-r--r-- | ldap/servers/plugins/chainingdb/cb_controls.c | 2 | ||||
-rw-r--r-- | ldap/servers/plugins/replication/repl5_total.c | 4 | ||||
-rw-r--r-- | ldap/servers/plugins/replication/repl_extop.c | 4 | ||||
-rw-r--r-- | ldap/servers/plugins/replication/windows_private.c | 4 | ||||
-rw-r--r-- | ldap/servers/slapd/back-ldbm/proto-back-ldbm.h | 14 | ||||
-rw-r--r-- | ldap/servers/slapd/back-ldbm/sort.c | 2 | ||||
-rw-r--r-- | ldap/servers/slapd/back-ldbm/vlv.c | 14 | ||||
-rw-r--r-- | ldap/servers/slapd/delete.c | 2 | ||||
-rw-r--r-- | ldap/servers/slapd/modrdn.c | 2 | ||||
-rw-r--r-- | ldap/servers/slapd/opshared.c | 2 | ||||
-rw-r--r-- | ldap/servers/slapd/proto-slap.h | 6 | ||||
-rw-r--r-- | ldap/servers/slapd/psearch.c | 8 | ||||
-rw-r--r-- | ldap/servers/slapd/pw.c | 2 | ||||
-rw-r--r-- | ldap/servers/slapd/stubrepl.c | 2 |
14 files changed, 33 insertions, 35 deletions
diff --git a/ldap/servers/plugins/chainingdb/cb_controls.c b/ldap/servers/plugins/chainingdb/cb_controls.c index ed9b0e9f..1b7bfcbb 100644 --- a/ldap/servers/plugins/chainingdb/cb_controls.c +++ b/ldap/servers/plugins/chainingdb/cb_controls.c @@ -93,7 +93,7 @@ cb_unregister_supported_control( cb_backend * cb, char *controloid, unsigned lon } int cb_create_loop_control ( - const int hops, + const ber_int_t hops, LDAPControl **ctrlp) { diff --git a/ldap/servers/plugins/replication/repl5_total.c b/ldap/servers/plugins/replication/repl5_total.c index e66a4f90..dc309a21 100644 --- a/ldap/servers/plugins/replication/repl5_total.c +++ b/ldap/servers/plugins/replication/repl5_total.c @@ -251,9 +251,8 @@ static int my_ber_printf_csn(BerElement *ber, const CSN *csn, const CSNType t) { char csn_str[CSN_STRSIZE]; - unsigned long len; int rc = -1; - int csn_type_as_ber = -1; + ber_int_t csn_type_as_ber = -1; switch (t) { @@ -284,7 +283,6 @@ my_ber_printf_csn(BerElement *ber, const CSN *csn, const CSNType t) } else { - len = CSN_STRSIZE; rc = ber_printf(ber, "{es}", csn_type_as_ber, csn_str); BER_DEBUG("{e(csn type)s(csn)}"); } diff --git a/ldap/servers/plugins/replication/repl_extop.c b/ldap/servers/plugins/replication/repl_extop.c index b5d882df..d82994fa 100644 --- a/ldap/servers/plugins/replication/repl_extop.c +++ b/ldap/servers/plugins/replication/repl_extop.c @@ -535,7 +535,7 @@ int multimaster_extop_StartNSDS50ReplicationRequest(Slapi_PBlock *pb) { int return_value = SLAPI_PLUGIN_EXTENDED_NOT_HANDLED; - int response = 0; + ber_int_t response = 0; int rc = 0; BerElement *resp_bere = NULL; struct berval *resp_bval = NULL; @@ -1026,7 +1026,7 @@ multimaster_extop_EndNSDS50ReplicationRequest(Slapi_PBlock *pb) char *repl_root = NULL; BerElement *resp_bere = NULL; struct berval *resp_bval = NULL; - int response; + ber_int_t response; void *conn; consumer_connection_extension *connext = NULL; int rc; diff --git a/ldap/servers/plugins/replication/windows_private.c b/ldap/servers/plugins/replication/windows_private.c index 8bd8d136..935379f3 100644 --- a/ldap/servers/plugins/replication/windows_private.c +++ b/ldap/servers/plugins/replication/windows_private.c @@ -51,8 +51,8 @@ struct windowsprivate { /* this simplifies the mapping as it's simply from the former to the latter container, or vice versa */ - int dirsync_flags; - int dirsync_maxattributecount; + ber_int_t dirsync_flags; + ber_int_t dirsync_maxattributecount; char *dirsync_cookie; int dirsync_cookie_len; PRBool dirsync_cookie_has_more; diff --git a/ldap/servers/slapd/back-ldbm/proto-back-ldbm.h b/ldap/servers/slapd/back-ldbm/proto-back-ldbm.h index b04e5d76..35894dd3 100644 --- a/ldap/servers/slapd/back-ldbm/proto-back-ldbm.h +++ b/ldap/servers/slapd/back-ldbm/proto-back-ldbm.h @@ -458,19 +458,19 @@ int ldbm_back_dbmonitor_search(Slapi_PBlock *pb, Slapi_Entry *e, */ struct vlv_request { - ber_uint_t beforeCount; - ber_uint_t afterCount; + ber_int_t beforeCount; + ber_int_t afterCount; ber_tag_t tag; - ber_uint_t index; - ber_uint_t contentCount; + ber_int_t index; + ber_int_t contentCount; struct berval value; }; struct vlv_response { - ber_uint_t targetPosition; - ber_uint_t contentCount; - ber_uint_t result; + ber_int_t targetPosition; + ber_int_t contentCount; + ber_int_t result; }; int vlv_init(ldbm_instance *inst); diff --git a/ldap/servers/slapd/back-ldbm/sort.c b/ldap/servers/slapd/back-ldbm/sort.c index ca2c0d24..9b77917f 100644 --- a/ldap/servers/slapd/back-ldbm/sort.c +++ b/ldap/servers/slapd/back-ldbm/sort.c @@ -225,7 +225,7 @@ make_sort_response_control ( Slapi_PBlock *pb, int code, char *error_type) { BerElement *ber= NULL; struct berval *bvp = NULL; int rc = -1; - int control_code = code; + ber_int_t control_code = code; /* SortResult ::= SEQUENCE { diff --git a/ldap/servers/slapd/back-ldbm/vlv.c b/ldap/servers/slapd/back-ldbm/vlv.c index da206b8f..9d3f26fc 100644 --- a/ldap/servers/slapd/back-ldbm/vlv.c +++ b/ldap/servers/slapd/back-ldbm/vlv.c @@ -1362,7 +1362,7 @@ static PRUint32 vlv_trim_candidates_byindex(PRUint32 length, const struct vlv_request *vlv_request_control) { PRUint32 si= 0; /* The Selected Index */ - LDAPDebug( LDAP_DEBUG_TRACE, "=> vlv_trim_candidates_byindex: length=%lu index=%lu size=%lu\n",length, vlv_request_control->index, vlv_request_control->contentCount ); + LDAPDebug( LDAP_DEBUG_TRACE, "=> vlv_trim_candidates_byindex: length=%u index=%d size=%d\n",length, vlv_request_control->index, vlv_request_control->contentCount ); if(vlv_request_control->index==0) { /* Always select the first entry in the list */ @@ -1633,7 +1633,7 @@ vlv_make_response_control (Slapi_PBlock *pb, const struct vlv_response* vlvp) ber_bvfree(bvp); } - LDAPDebug( LDAP_DEBUG_TRACE, "<= vlv_make_response_control: Index=%u Size=%u Result=%u\n", vlvp->targetPosition, vlvp->contentCount, vlvp->result ); + LDAPDebug( LDAP_DEBUG_TRACE, "<= vlv_make_response_control: Index=%d Size=%d Result=%d\n", vlvp->targetPosition, vlvp->contentCount, vlvp->result ); return (rc==-1?LDAP_OPERATIONS_ERROR:LDAP_SUCCESS); } @@ -1655,7 +1655,7 @@ void vlv_print_access_log(Slapi_PBlock *pb,struct vlv_request* vlvi, struct vlv_ p+= sprintf(p,"VLV "); if (0 == vlvi->tag) { /* By Index case */ - p+= sprintf(p,"%u:%u:%u:%u", + p+= sprintf(p,"%d:%d:%d:%d", vlvi->beforeCount , vlvi->afterCount , vlvi->index , @@ -1672,7 +1672,7 @@ void vlv_print_access_log(Slapi_PBlock *pb,struct vlv_request* vlvi, struct vlv_ } strncpy(string,vlvi->value.bv_val,vlvi->value.bv_len); string[vlvi->value.bv_len] = '\0'; - p += sprintf(p,"%u:%u:%s", + p += sprintf(p,"%d:%d:%s", vlvi->beforeCount , vlvi->afterCount , string @@ -1682,7 +1682,7 @@ void vlv_print_access_log(Slapi_PBlock *pb,struct vlv_request* vlvi, struct vlv_ } } /* Now the response info */ - p += sprintf(p," %u:%u (%u)", + p += sprintf(p," %d:%d (%d)", vlvo->targetPosition , vlvo->contentCount, vlvo->result @@ -1733,7 +1733,7 @@ vlv_parse_request_control( backend *be, struct berval *vlv_spec_ber,struct vlv_r } else { - LDAPDebug( LDAP_DEBUG_TRACE, "vlv_parse_request_control: Before=%u After=%u\n", + LDAPDebug( LDAP_DEBUG_TRACE, "vlv_parse_request_control: Before=%d After=%d\n", vlvp->beforeCount, vlvp->afterCount, 0 ); if (ber_scanf(ber,"t",&vlvp->tag) == LBER_ERROR) { @@ -1761,7 +1761,7 @@ vlv_parse_request_control( backend *be, struct berval *vlv_spec_ber,struct vlv_r { vlvp->index--; } - LDAPDebug( LDAP_DEBUG_TRACE, "vlv_parse_request_control: Index=%lu Content=%lu\n", vlvp->index, vlvp->contentCount, 0 ); + LDAPDebug( LDAP_DEBUG_TRACE, "vlv_parse_request_control: Index=%d Content=%d\n", vlvp->index, vlvp->contentCount, 0 ); } break; case LDAP_TAG_VLV_BY_VALUE: diff --git a/ldap/servers/slapd/delete.c b/ldap/servers/slapd/delete.c index 0e590957..fe09def7 100644 --- a/ldap/servers/slapd/delete.c +++ b/ldap/servers/slapd/delete.c @@ -322,7 +322,7 @@ static void op_shared_delete (Slapi_PBlock *pb) write_audit_log_entry(pb); /* Record the operation in the audit log */ slapi_pblock_get(pb, SLAPI_ENTRY_PRE_OP, &ecopy); - do_ps_service(ecopy, NULL, LDAP_CHANGETYPE_DELETE, 0UL); + do_ps_service(ecopy, NULL, LDAP_CHANGETYPE_DELETE, 0); } else { diff --git a/ldap/servers/slapd/modrdn.c b/ldap/servers/slapd/modrdn.c index 3d649669..64cc2c0e 100644 --- a/ldap/servers/slapd/modrdn.c +++ b/ldap/servers/slapd/modrdn.c @@ -487,7 +487,7 @@ op_shared_rename(Slapi_PBlock *pb, int passin_args) slapi_pblock_get(pb, SLAPI_ENTRY_POST_OP, &pse); slapi_pblock_get(pb, SLAPI_ENTRY_PRE_OP, &ecopy); /* GGOODREPL persistent search system needs the changenumber, oops. */ - do_ps_service(pse, ecopy, LDAP_CHANGETYPE_MODDN, 0UL); + do_ps_service(pse, ecopy, LDAP_CHANGETYPE_MODDN, 0); } } else diff --git a/ldap/servers/slapd/opshared.c b/ldap/servers/slapd/opshared.c index 58d6d4a7..02077c86 100644 --- a/ldap/servers/slapd/opshared.c +++ b/ldap/servers/slapd/opshared.c @@ -114,7 +114,7 @@ int op_shared_is_allowed_attr (const char *attr_name, int replicated_op) static ps_service_fn_ptr ps_service_fn = NULL; void -do_ps_service(Slapi_Entry *e, Slapi_Entry *eprev, int chgtype, int chgnum) +do_ps_service(Slapi_Entry *e, Slapi_Entry *eprev, ber_int_t chgtype, ber_int_t chgnum) { if (NULL == ps_service_fn) { if (get_entry_point(ENTRY_POINT_PS_SERVICE, (caddr_t *)(&ps_service_fn)) < 0) { diff --git a/ldap/servers/slapd/proto-slap.h b/ldap/servers/slapd/proto-slap.h index e9151811..5726a5c2 100644 --- a/ldap/servers/slapd/proto-slap.h +++ b/ldap/servers/slapd/proto-slap.h @@ -987,8 +987,8 @@ void ps_init_psearch_system(); void ps_stop_psearch_system(); void ps_add( Slapi_PBlock *pb, ber_int_t changetypes, int send_entchg_controls ); void ps_wakeup_all(); -void ps_service_persistent_searches( Slapi_Entry *e, Slapi_Entry *eprev, int chgtype, - int chgnum ); +void ps_service_persistent_searches( Slapi_Entry *e, Slapi_Entry *eprev, ber_int_t chgtype, + ber_int_t chgnum ); int ps_parse_control_value( struct berval *psbvp, ber_int_t *changetypesp, int *changesonlyp, int *returnecsp ); @@ -1136,7 +1136,7 @@ PRBool allow_operation (Slapi_PBlock *pb); void set_config_params (Slapi_PBlock *pb); /* set parameters common for all internal operations */ void set_common_params (Slapi_PBlock *pb); -void do_ps_service(Slapi_Entry *e, Slapi_Entry *eprev, int chgtype, int chgnum); +void do_ps_service(Slapi_Entry *e, Slapi_Entry *eprev, ber_int_t chgtype, ber_int_t chgnum); void modify_update_last_modified_attr(Slapi_PBlock *pb, Slapi_Mods *smods); /* diff --git a/ldap/servers/slapd/psearch.c b/ldap/servers/slapd/psearch.c index f6e082e1..ba010353 100644 --- a/ldap/servers/slapd/psearch.c +++ b/ldap/servers/slapd/psearch.c @@ -111,7 +111,7 @@ static PSearch *psearch_alloc(); static void ps_add_ps( PSearch *ps ); static void ps_remove( PSearch *dps ); static void pe_ch_free( PSEQNode **pe ); -static int create_entrychange_control( int chgtype, int chgnum, +static int create_entrychange_control( ber_int_t chgtype, ber_int_t chgnum, const char *prevdn, LDAPControl **ctrlp ); @@ -515,8 +515,8 @@ ps_wakeup_all() * client in the EntryChangeNotification control. */ void -ps_service_persistent_searches( Slapi_Entry *e, Slapi_Entry *eprev, int chgtype, - int chgnum ) +ps_service_persistent_searches( Slapi_Entry *e, Slapi_Entry *eprev, ber_int_t chgtype, + ber_int_t chgnum ) { LDAPControl *ctrl = NULL; PSearch *ps = NULL; @@ -707,7 +707,7 @@ ps_parse_control_value( struct berval *psbvp, ber_int_t *changetypesp, int *chan * If chgnum is 0 we omit it from the control. */ static int -create_entrychange_control( int chgtype, int chgnum, const char *dn, +create_entrychange_control( ber_int_t chgtype, ber_int_t chgnum, const char *dn, LDAPControl **ctrlp ) { int rc; diff --git a/ldap/servers/slapd/pw.c b/ldap/servers/slapd/pw.c index 7665a261..dd312d68 100644 --- a/ldap/servers/slapd/pw.c +++ b/ldap/servers/slapd/pw.c @@ -1637,7 +1637,7 @@ delete_passwdPolicy( passwdPolicy **pwpolicy) * operationsError (1), */ int -slapi_pwpolicy_make_response_control (Slapi_PBlock *pb, int seconds, int logins, int error) +slapi_pwpolicy_make_response_control (Slapi_PBlock *pb, int seconds, int logins, ber_int_t error) { BerElement *ber= NULL; struct berval *bvp = NULL; diff --git a/ldap/servers/slapd/stubrepl.c b/ldap/servers/slapd/stubrepl.c index 76b94897..8a7ba9ee 100644 --- a/ldap/servers/slapd/stubrepl.c +++ b/ldap/servers/slapd/stubrepl.c @@ -42,7 +42,7 @@ int connection_type = -1; void -ps_service_persistent_searches( Slapi_Entry *e, Slapi_Entry *eprev, int chgtype, int chgnum ) +ps_service_persistent_searches( Slapi_Entry *e, Slapi_Entry *eprev, ber_int_t chgtype, ber_int_t chgnum ) { } |