socket_read_line(): reset buffer offset when no bytes are left
socket_read() already did that.
This commit is contained in:
		
							parent
							
								
									69653aafeb
								
							
						
					
					
						commit
						6f15980cd9
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -834,7 +834,7 @@ socket_read_line( conn_t *conn ) | ||||||
| 	} | 	} | ||||||
| 	uint n = (uint)(p + 1 - s); | 	uint n = (uint)(p + 1 - s); | ||||||
| 	cnt -= n; | 	cnt -= n; | ||||||
| 	conn->offset = off + n; | 	conn->offset = cnt ? off + n : 0; | ||||||
| 	conn->bytes = cnt; | 	conn->bytes = cnt; | ||||||
| 	conn->scanoff = 0; | 	conn->scanoff = 0; | ||||||
| 	if (p != s && p[-1] == '\r') | 	if (p != s && p[-1] == '\r') | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue