mirror of
				https://gitlab.freedesktop.org/wayland/wayland.git
				synced 2025-11-03 09:01:42 -05:00 
			
		
		
		
	client: Don't abort when sending a request fails
Instead, set a fatal display error which will let an application using libwayland-client shutdown cleanly. Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
This commit is contained in:
		
							parent
							
								
									6265dd4f07
								
							
						
					
					
						commit
						8a831ac6ec
					
				
					 1 changed files with 9 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -745,14 +745,19 @@ wl_proxy_marshal_array_constructor_versioned(struct wl_proxy *proxy,
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	closure = wl_closure_marshal(&proxy->object, opcode, args, message);
 | 
			
		||||
	if (closure == NULL)
 | 
			
		||||
		wl_abort("Error marshalling request: %s\n", strerror(errno));
 | 
			
		||||
	if (closure == NULL) {
 | 
			
		||||
		wl_log("Error marshalling request: %s\n", strerror(errno));
 | 
			
		||||
		display_fatal_error(proxy->display, errno);
 | 
			
		||||
		goto err_unlock;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (debug_client)
 | 
			
		||||
		wl_closure_print(closure, &proxy->object, true);
 | 
			
		||||
 | 
			
		||||
	if (wl_closure_send(closure, proxy->display->connection))
 | 
			
		||||
		wl_abort("Error sending request: %s\n", strerror(errno));
 | 
			
		||||
	if (wl_closure_send(closure, proxy->display->connection)) {
 | 
			
		||||
		wl_log("Error sending request: %s\n", strerror(errno));
 | 
			
		||||
		display_fatal_error(proxy->display, errno);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	wl_closure_destroy(closure);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue