From 643ca3669b74c63578c64df7b7e1819ef0d6b9b7 Mon Sep 17 00:00:00 2001
From: Tom Rondeau <tom@trondeau.com>
Date: Mon, 28 Jul 2014 11:33:16 -0400
Subject: blocks: correcting use of mutexes in file_meta_sink.

the gr::block class has a d_setlock mutex that's appropriate for this use instead of creating another for the child class.
---
 gr-blocks/lib/file_meta_sink_impl.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'gr-blocks/lib/file_meta_sink_impl.cc')

diff --git a/gr-blocks/lib/file_meta_sink_impl.cc b/gr-blocks/lib/file_meta_sink_impl.cc
index 06ac051d8c..027d12faf2 100644
--- a/gr-blocks/lib/file_meta_sink_impl.cc
+++ b/gr-blocks/lib/file_meta_sink_impl.cc
@@ -171,7 +171,7 @@ namespace gr {
     bool
     file_meta_sink_impl::_open(FILE **fp, const char *filename)
     {
-      gr::thread::scoped_lock guard(d_mutex); // hold mutex for duration of this function
+      gr::thread::scoped_lock guard(d_setlock); // hold mutex for duration of this function
 
       bool ret = true;
       int fd;
@@ -201,7 +201,7 @@ namespace gr {
     void
     file_meta_sink_impl::close()
     {
-      gr::thread::scoped_lock guard(d_mutex); // hold mutex for duration of this function
+      gr::thread::scoped_lock guard(d_setlock); // hold mutex for duration of this function
       update_last_header();
 
       if(d_state == STATE_DETACHED) {
@@ -222,7 +222,7 @@ namespace gr {
     file_meta_sink_impl::do_update()
     {
       if(d_updated) {
-	gr::thread::scoped_lock guard(d_mutex); // hold mutex for duration of this block
+	gr::thread::scoped_lock guard(d_setlock); // hold mutex for duration of this block
 	if(d_state == STATE_DETACHED) {
 	  if(d_hdr_fp)
 	    fclose(d_hdr_fp);
-- 
cgit v1.2.3