mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	core: send an error when receiving invalid mem
And also print the client error when we get it.
This commit is contained in:
		
							parent
							
								
									ee5c3349a0
								
							
						
					
					
						commit
						b17ff6e2ad
					
				
					 2 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -106,6 +106,7 @@ static void core_event_add_mem(void *data, uint32_t id, uint32_t type, int fd, u
 | 
			
		|||
	if (m->id != id) {
 | 
			
		||||
		pw_log_error(NAME" %p: invalid mem id %u, expected %u",
 | 
			
		||||
				this, id, m->id);
 | 
			
		||||
		pw_proxy_errorf(&this->proxy, -EINVAL, "invalid mem id %u, expected %u", id, m->id);
 | 
			
		||||
		pw_memblock_unref(m);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -202,7 +202,7 @@ static int core_error(void *object, uint32_t id, int seq, int res, const char *m
 | 
			
		|||
	struct pw_impl_client *client = resource->client;
 | 
			
		||||
	struct pw_resource *r;
 | 
			
		||||
 | 
			
		||||
	pw_log_debug(NAME" %p: error %d for resource %d: %s", resource->context, res, id, message);
 | 
			
		||||
	pw_log_error(NAME" %p: error %d for resource %d: %s", resource->context, res, id, message);
 | 
			
		||||
 | 
			
		||||
	if ((r = pw_impl_client_find_resource(client, id)) == NULL)
 | 
			
		||||
		return -EINVAL;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue