X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=lib%2Fpcap-file.c;h=a850d217fb68f28ec29e4f4fc8257476f6293f4e;hb=d0a46cb4608e632f5028034762f0adde2ce947a0;hp=553a7b6d7b0c95a125556ef3d635c3b02e71e909;hpb=cf62fa4c7074121184a1f1d07980990113657612;p=cascardo%2Fovs.git diff --git a/lib/pcap-file.c b/lib/pcap-file.c index 553a7b6d7..a850d217f 100644 --- a/lib/pcap-file.c +++ b/lib/pcap-file.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, 2012, 2013, 2014 Nicira, Inc. + * Copyright (c) 2009, 2010, 2012, 2013, 2014, 2015 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -130,6 +130,7 @@ ovs_pcap_write_header(FILE *file) ph.snaplen = 1518; ph.network = 1; /* Ethernet */ ignore(fwrite(&ph, sizeof ph, 1, file)); + fflush(file); } int @@ -202,6 +203,7 @@ ovs_pcap_write(FILE *file, struct dp_packet *buf) prh.orig_len = dp_packet_size(buf); ignore(fwrite(&prh, sizeof prh, 1, file)); ignore(fwrite(dp_packet_data(buf), dp_packet_size(buf), 1, file)); + fflush(file); } struct tcp_key {