r1468: Dump the parametrical options only once at the end of the service.
authorSimo Sorce <idra@samba.org>
Mon, 12 Jul 2004 15:30:23 +0000 (15:30 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:52:11 +0000 (10:52 -0500)
Fixes Testparm producing huge output and swat creating monster smb.conf files.
(This used to be commit 9c41adb98b8eef344203d80ef38cf96a27853c7f)

source3/param/loadparm.c

index a309fde007fe75d88e54913b3e45c5929258df8f..978ea89d5c6da269f6ef4605456e63544e27987c 100644 (file)
@@ -3552,14 +3552,14 @@ static void dump_a_service(service * pService, FILE * f)
                                        ((char *)pService) + pdiff, f);
                        fprintf(f, "\n");
                }
+       }
 
-               if (pService->param_opt != NULL) {
-                       data = pService->param_opt;
-                       while(data) {
-                               fprintf(f, "\t%s = %s\n", data->key, data->value);
-                               data = data->next;
-                       }
-               }
+       if (pService->param_opt != NULL) {
+               data = pService->param_opt;
+               while(data) {
+                       fprintf(f, "\t%s = %s\n", data->key, data->value);
+                       data = data->next;
+               }
        }
 }