for every policy we write out, flush the output so we don't get an
authorphessler <phessler@openbsd.org>
Sun, 26 Apr 2015 11:32:54 +0000 (11:32 +0000)
committerphessler <phessler@openbsd.org>
Sun, 26 Apr 2015 11:32:54 +0000 (11:32 +0000)
irritating partially written line

usr.sbin/bgpctl/irr_output.c

index 3a14e9b..058858a 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: irr_output.c,v 1.17 2015/04/25 15:28:18 phessler Exp $ */
+/*     $OpenBSD: irr_output.c,v 1.18 2015/04/26 11:32:54 phessler Exp $ */
 
 /*
  * Copyright (c) 2007 Henning Brauer <henning@openbsd.org>
@@ -97,6 +97,7 @@ process_policies(FILE *fh, struct policy_head *head)
 
                policy_prettyprint(fh, pi);
                policy_torule(fh, pi);
+               fflush(fh);
 
                free(pi->peer_addr);
                free(pi->action);