mirror of
				https://github.com/f4exb/sdrangel.git
				synced 2025-11-04 05:30:32 -05:00 
			
		
		
		
	Tx ph.1: handle default file name correctly in FileSink
This commit is contained in:
		
							parent
							
								
									e42a717c69
								
							
						
					
					
						commit
						3b132cf471
					
				@ -54,8 +54,6 @@ FileSinkOutput::~FileSinkOutput()
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void FileSinkOutput::openFileStream()
 | 
					void FileSinkOutput::openFileStream()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	//stopInput();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (m_ofstream.is_open()) {
 | 
						if (m_ofstream.is_open()) {
 | 
				
			||||||
		m_ofstream.close();
 | 
							m_ofstream.close();
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@ -80,9 +78,10 @@ bool FileSinkOutput::start(int device)
 | 
				
			|||||||
	QMutexLocker mutexLocker(&m_mutex);
 | 
						QMutexLocker mutexLocker(&m_mutex);
 | 
				
			||||||
	qDebug() << "FileSinkOutput::start";
 | 
						qDebug() << "FileSinkOutput::start";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	//openFileStream();
 | 
						openFileStream();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if((m_fileSinkThread = new FileSinkThread(&m_ofstream, &m_sampleSourceFifo)) == 0) {
 | 
						if((m_fileSinkThread = new FileSinkThread(&m_ofstream, &m_sampleSourceFifo)) == 0)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
		qFatal("out of memory");
 | 
							qFatal("out of memory");
 | 
				
			||||||
		stop();
 | 
							stop();
 | 
				
			||||||
		return false;
 | 
							return false;
 | 
				
			||||||
@ -114,6 +113,10 @@ void FileSinkOutput::stop()
 | 
				
			|||||||
		m_fileSinkThread = 0;
 | 
							m_fileSinkThread = 0;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (m_ofstream.is_open()) {
 | 
				
			||||||
 | 
					        m_ofstream.close();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    MsgReportFileSinkGeneration *report = MsgReportFileSinkGeneration::create(false); // acquisition off
 | 
					    MsgReportFileSinkGeneration *report = MsgReportFileSinkGeneration::create(false); // acquisition off
 | 
				
			||||||
	getOutputMessageQueueToGUI()->push(report);
 | 
						getOutputMessageQueueToGUI()->push(report);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user