]> git.sur5r.net Git - openldap/commitdiff
re-fix ITS#6645 commit
authorPierangelo Masarati <ando@openldap.org>
Tue, 7 Dec 2010 11:58:38 +0000 (11:58 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 7 Dec 2010 11:58:38 +0000 (11:58 +0000)
servers/slapd/slapcommon.c
servers/slapd/slapcommon.h

index efd068b860b8c7c2387fd86313bd6e1b0f78c1cc..a38e0db85298030607d1ccca5da255650d7bed83 100644 (file)
@@ -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;
 
index 5b7c1d8d73c913b5339ebfc7fbb25be3ba00888f..b0efa7f8c026b3489028099f71047ee32dc46935 100644 (file)
@@ -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;