wmbiff: Remove unnecessary loop.
The last release of wmbiff included a patch by Nye Liu from Debian bug #917467 [1]. However, the second part of that patch is not necessary. From Andreas Metzler's comment I am not sure about the second part of the patch. I understand wmbiff breaking on GNUTLS_E_AGAIN from gnutls_read, because this only started to happen recently (with TLS1.3) on blocking sockets. What I do not get from my rudimentary understanding C programmimg is the second part, this is in the else of "if (scs->tls_state)", so, afaiui for non-encrypted connections. Is the change necessary there at all, is it the right thing to retry read on EAGAIN then? We revert the second part of the patch. [1] https://bugs.debian.org/917467
This commit is contained in:
		
							parent
							
								
									e807986e6e
								
							
						
					
					
						commit
						9527870311
					
				
					 1 changed files with 3 additions and 5 deletions
				
			
		| 
						 | 
					@ -242,11 +242,9 @@ tlscomm_expect(struct connection_state *scs,
 | 
				
			||||||
			} else
 | 
								} else
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				do {
 | 
					 | 
				
			||||||
				thisreadbytes =
 | 
									thisreadbytes =
 | 
				
			||||||
					read(scs->sd, &scs->unprocessed[buffered_bytes],
 | 
										read(scs->sd, &scs->unprocessed[buffered_bytes],
 | 
				
			||||||
						 BUF_SIZE - 1 - buffered_bytes);
 | 
											 BUF_SIZE - 1 - buffered_bytes);
 | 
				
			||||||
				} while (thisreadbytes == EAGAIN);
 | 
					 | 
				
			||||||
				if (thisreadbytes < 0) {
 | 
									if (thisreadbytes < 0) {
 | 
				
			||||||
					TDM(DEBUG_ERROR, "%s: error reading: %s\n",
 | 
										TDM(DEBUG_ERROR, "%s: error reading: %s\n",
 | 
				
			||||||
						scs->name, strerror(errno));
 | 
											scs->name, strerror(errno));
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue