mirror of
				https://gitlab.freedesktop.org/wayland/wayland.git
				synced 2025-11-03 09:01:42 -05:00 
			
		
		
		
	connection: reserve id on incoming new object
If a new object id arrives ensure that there is an empty array entry created, otherwise we might get out of sync for new ids if object isn't created by interface implementation.
This commit is contained in:
		
							parent
							
								
									bfcd681930
								
							
						
					
					
						commit
						0b8b397e34
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -756,14 +756,14 @@ wl_connection_demarshal(struct wl_connection *connection,
 | 
			
		|||
			closure->args[i] = id;
 | 
			
		||||
			*id = p;
 | 
			
		||||
 | 
			
		||||
			object = wl_map_lookup(objects, *p);
 | 
			
		||||
			if (object != NULL) {
 | 
			
		||||
				printf("not a new object (%d), "
 | 
			
		||||
			if (wl_map_reserve_new(objects, *p) < 0) {
 | 
			
		||||
				printf("not a valid new object id (%d), "
 | 
			
		||||
				       "message %s(%s)\n",
 | 
			
		||||
				       *p, message->name, message->signature);
 | 
			
		||||
				errno = EINVAL;
 | 
			
		||||
				goto err;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			p++;
 | 
			
		||||
			break;
 | 
			
		||||
		case 'a':
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue