mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 02:00:05 +00:00 
			
		
		
		
	Ignore empty messages for clutter filter bypass map and VCP data
This commit is contained in:
		
							parent
							
								
									2fd7dca8a4
								
							
						
					
					
						commit
						af1b42e7b0
					
				
					 2 changed files with 28 additions and 17 deletions
				
			
		|  | @ -78,9 +78,11 @@ bool ClutterFilterBypassMap::Parse(std::istream& is) | |||
| 
 | ||||
|    if (p->mapGenerationDate_ < 1) | ||||
|    { | ||||
|       logger_->warn("Invalid date: {}", p->mapGenerationDate_); | ||||
|       logger_->trace("Ignoring empty message"); | ||||
|       messageValid = false; | ||||
|    } | ||||
|    else | ||||
|    { | ||||
|       if (p->mapGenerationTime_ > 1440) | ||||
|       { | ||||
|          logger_->warn("Invalid time: {}", p->mapGenerationTime_); | ||||
|  | @ -92,6 +94,7 @@ bool ClutterFilterBypassMap::Parse(std::istream& is) | |||
|                        numElevationSegments); | ||||
|          messageValid = false; | ||||
|       } | ||||
|    } | ||||
| 
 | ||||
|    if (!messageValid) | ||||
|    { | ||||
|  |  | |||
|  | @ -419,6 +419,13 @@ bool VolumeCoveragePatternData::Parse(std::istream& is) | |||
|    p->vcpSequencing_       = ntohs(p->vcpSequencing_); | ||||
|    p->vcpSupplementalData_ = ntohs(p->vcpSupplementalData_); | ||||
| 
 | ||||
|    if (messageSize == 0) | ||||
|    { | ||||
|       logger_->trace("Ignoring empty message"); | ||||
|       messageValid = false; | ||||
|    } | ||||
|    else | ||||
|    { | ||||
|       if (messageSize < 34 || messageSize > 747) | ||||
|       { | ||||
|          logger_->warn("Invalid message size: {}", messageSize); | ||||
|  | @ -430,6 +437,7 @@ bool VolumeCoveragePatternData::Parse(std::istream& is) | |||
|                        numberOfElevationCuts); | ||||
|          messageValid = false; | ||||
|       } | ||||
|    } | ||||
| 
 | ||||
|    if (!messageValid) | ||||
|    { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat