rename payload to response in response size parsing
This commit is contained in:
		
							parent
							
								
									bc495a7592
								
							
						
					
					
						commit
						a4c8d03eb9
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -268,7 +268,7 @@ impl<UART: serial::Uart> Modem<UART> {
 | 
			
		|||
        Ok(())
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    fn tcp_parse_payload_size(&mut self, reply_line: &str) -> Result<usize> {
 | 
			
		||||
    fn tcp_parse_response_size(&mut self, reply_line: &str) -> Result<usize> {
 | 
			
		||||
        reply_line.split(',')
 | 
			
		||||
            .into_iter()
 | 
			
		||||
            .last()
 | 
			
		||||
| 
						 | 
				
			
			@ -283,7 +283,7 @@ impl<UART: serial::Uart> Modem<UART> {
 | 
			
		|||
            .filter(|line| line.contains("+CIPRXGET: 4"))
 | 
			
		||||
            .next()
 | 
			
		||||
            .ok_or(ModemError::CommandError("reply not found :/".to_string()))
 | 
			
		||||
            .map(|line| self.tcp_parse_payload_size(line))
 | 
			
		||||
            .map(|line| self.tcp_parse_response_size(line))
 | 
			
		||||
            .unwrap_or(Err(ModemError::CommandError(format!("received 0 elements from parsing"))))
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue