]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/config.c
Fix previous commit
[openldap] / servers / slapd / config.c
index 7442953c7d19dc774b3a320dc9ee712a1f286664..1faa1a813428a35208de9ae978e470e31f60fc4c 100644 (file)
@@ -77,7 +77,7 @@ read_config( const char *fname )
        int rc;
        struct berval vals[2];
 
-       static int lastmod = ON;
+       static int lastmod = 1;
        static BackendInfo *bi = NULL;
        static BackendDB        *be = NULL;
 
@@ -1996,13 +1996,13 @@ read_config( const char *fname )
                                if ( be ) {
                                        be->be_flags &= ~SLAP_BFLAG_NOLASTMOD;
                                } else {
-                                       lastmod = ON;
+                                       lastmod = 1;
                                }
                        } else {
                                if ( be ) {
                                        be->be_flags |= SLAP_BFLAG_NOLASTMOD;
                                } else {
-                                       lastmod = OFF;
+                                       lastmod = 0;
                                }
                        }
 
@@ -2377,12 +2377,22 @@ fp_getline( FILE *fp, int *lineno )
                        if( p > buf && p[-1] == '\r' ) --p;
                        *p = '\0';
                }
-               if ( ! isspace( (unsigned char) buf[0] ) ) {
-                       return( line );
-               }
+               
+               /* trim off trailing \ and append the next line */
+               if ( line[ 0 ] != '\0' 
+                               && (p = line + strlen( line ) - 1)[ 0 ] == '\\'
+                               && p[ -1 ] != '\\' ) {
+                       p[ 0 ] = '\0';
+                       lcur--;
 
-               /* change leading whitespace to a space */
-               buf[0] = ' ';
+               } else {
+                       if ( ! isspace( (unsigned char) buf[0] ) ) {
+                               return( line );
+                       }
+
+                       /* change leading whitespace to a space */
+                       buf[0] = ' ';
+               }
 
                CATLINE( buf );
                (*lineno)++;