/* -*- c++ -*- */
/*
- * Copyright 2004,2006,2007 Free Software Foundation, Inc.
+ * Copyright 2004,2006,2007,2010 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
+ * the Free Software Foundation; either version 3, or (at your option)
* any later version.
*
* GNU Radio is distributed in the hope that it will be useful,
gr_file_sink_sptr
gr_make_file_sink (size_t itemsize, const char *filename)
{
- return gr_file_sink_sptr (new gr_file_sink (itemsize, filename));
+ return gnuradio::get_initial_sptr(new gr_file_sink (itemsize, filename));
}
gr_file_sink::gr_file_sink(size_t itemsize, const char *filename)
nwritten += count;
inbuf += count * d_itemsize;
}
+ if (d_unbuffered)
+ fflush (d_fp);
+
return nwritten;
}