mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 04:30: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) |    if (p->mapGenerationDate_ < 1) | ||||||
|    { |    { | ||||||
|       logger_->warn("Invalid date: {}", p->mapGenerationDate_); |       logger_->trace("Ignoring empty message"); | ||||||
|       messageValid = false; |       messageValid = false; | ||||||
|    } |    } | ||||||
|  |    else | ||||||
|  |    { | ||||||
|       if (p->mapGenerationTime_ > 1440) |       if (p->mapGenerationTime_ > 1440) | ||||||
|       { |       { | ||||||
|          logger_->warn("Invalid time: {}", p->mapGenerationTime_); |          logger_->warn("Invalid time: {}", p->mapGenerationTime_); | ||||||
|  | @ -92,6 +94,7 @@ bool ClutterFilterBypassMap::Parse(std::istream& is) | ||||||
|                        numElevationSegments); |                        numElevationSegments); | ||||||
|          messageValid = false; |          messageValid = false; | ||||||
|       } |       } | ||||||
|  |    } | ||||||
| 
 | 
 | ||||||
|    if (!messageValid) |    if (!messageValid) | ||||||
|    { |    { | ||||||
|  |  | ||||||
|  | @ -419,6 +419,13 @@ bool VolumeCoveragePatternData::Parse(std::istream& is) | ||||||
|    p->vcpSequencing_       = ntohs(p->vcpSequencing_); |    p->vcpSequencing_       = ntohs(p->vcpSequencing_); | ||||||
|    p->vcpSupplementalData_ = ntohs(p->vcpSupplementalData_); |    p->vcpSupplementalData_ = ntohs(p->vcpSupplementalData_); | ||||||
| 
 | 
 | ||||||
|  |    if (messageSize == 0) | ||||||
|  |    { | ||||||
|  |       logger_->trace("Ignoring empty message"); | ||||||
|  |       messageValid = false; | ||||||
|  |    } | ||||||
|  |    else | ||||||
|  |    { | ||||||
|       if (messageSize < 34 || messageSize > 747) |       if (messageSize < 34 || messageSize > 747) | ||||||
|       { |       { | ||||||
|          logger_->warn("Invalid message size: {}", messageSize); |          logger_->warn("Invalid message size: {}", messageSize); | ||||||
|  | @ -430,6 +437,7 @@ bool VolumeCoveragePatternData::Parse(std::istream& is) | ||||||
|                        numberOfElevationCuts); |                        numberOfElevationCuts); | ||||||
|          messageValid = false; |          messageValid = false; | ||||||
|       } |       } | ||||||
|  |    } | ||||||
| 
 | 
 | ||||||
|    if (!messageValid) |    if (!messageValid) | ||||||
|    { |    { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat