]> git.sur5r.net Git - openldap/blobdiff - servers/slurpd/fm.c
A few changes to the handling of operational attributes.
[openldap] / servers / slurpd / fm.c
index 0cb813caca42e86d1f30255f7f3f0857ecc0d1a1..9186ec8f519a678ddff6e180892dda65c34ff522 100644 (file)
@@ -1,3 +1,8 @@
+/* $OpenLDAP$ */
+/*
+ * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
 /*
  * Copyright (c) 1996 Regents of the University of Michigan.
  * All rights reserved.
@@ -17,8 +22,8 @@
 #include "portable.h"
 
 #include <stdio.h>
-#include <stdlib.h>                    /* get free() */
 
+#include <ac/stdlib.h>
 #include <ac/string.h>
 #include <ac/signal.h>
 
@@ -143,7 +148,7 @@ set_shutdown(int sig)
        (sglob->replicas[ i ])->ri_wake( sglob->replicas[ i ]);
     }
     sglob->rq->rq_unlock( sglob->rq );                 /* unlock queue */
-    (void) SIGNAL( sig, set_shutdown );        /* reinstall handlers */
+    (void) SIGNAL_REINSTALL( sig, set_shutdown );      /* reinstall handlers */
 }
 
 
@@ -155,7 +160,7 @@ set_shutdown(int sig)
 RETSIGTYPE
 do_nothing(int sig)
 {
-    (void) SIGNAL( sig, do_nothing );
+    (void) SIGNAL_REINSTALL( sig, do_nothing );
 }
 
 
@@ -229,12 +234,13 @@ get_record(
 
     while (( fgets( line, sizeof(line), fp ) != NULL ) &&
            (( len = strlen( line )) > 1 )) {
-       while ( lcur + len + 1 > lmax ) {
-           lmax += BUFSIZ;
-           buf = (char *) ch_realloc( buf, lmax );
-       }
-       strcpy( buf + lcur, line );
-       lcur += len;
+
+               while ( lcur + len + 1 > lmax ) {
+                   lmax += BUFSIZ;
+                   buf = (char *) ch_realloc( buf, lmax );
+               }
+               strcpy( buf + lcur, line );
+               lcur += len;
     }
     return( buf );
 }