From: Pierangelo Masarati Date: Tue, 7 Dec 2010 11:58:38 +0000 (+0000) Subject: re-fix ITS#6645 commit X-Git-Tag: MIGRATION_CVS2GIT~369 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=351bc07fcc91b27070cccd956c39557a3c9f79a9;p=openldap re-fix ITS#6645 commit --- diff --git a/servers/slapd/slapcommon.c b/servers/slapd/slapcommon.c index efd068b860..a38e0db852 100644 --- a/servers/slapd/slapcommon.c +++ b/servers/slapd/slapcommon.c @@ -234,9 +234,13 @@ parse_slapopt( int tool, int *mode ) if ( strcasecmp( p, "no" ) == 0 ) { ldif_wrap = LDIF_LINE_WIDTH_MAX; - } else if ( lutil_atou( &ldif_wrap, p ) ) { - Debug( LDAP_DEBUG_ANY, "unable to parse ldif-wrap=\"%s\".\n", p, 0, 0 ); - return -1; + } else { + unsigned int u; + if ( lutil_atou( &u, p ) ) { + Debug( LDAP_DEBUG_ANY, "unable to parse ldif-wrap=\"%s\".\n", p, 0, 0 ); + return -1; + } + ldif_wrap = (ber_len_t)u; } break; diff --git a/servers/slapd/slapcommon.h b/servers/slapd/slapcommon.h index 5b7c1d8d73..b0efa7f8c0 100644 --- a/servers/slapd/slapcommon.h +++ b/servers/slapd/slapcommon.h @@ -65,7 +65,7 @@ typedef struct tool_vars { slap_ssf_t tv_sasl_ssf; unsigned tv_dn_mode; unsigned int tv_csnsid; - unsigned int tv_ldif_wrap; + ber_len_t tv_ldif_wrap; char tv_maxcsnbuf[ LDAP_PVT_CSNSTR_BUFSIZE * ( SLAP_SYNC_SID_MAX + 1 ) ]; struct berval tv_maxcsn[ SLAP_SYNC_SID_MAX + 1 ]; } tool_vars;