mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	cli: fix node-params
This commit is contained in:
		
							parent
							
								
									01e28dd7a8
								
							
						
					
					
						commit
						a55330fe29
					
				
					 1 changed files with 7 additions and 2 deletions
				
			
		| 
						 | 
					@ -1151,10 +1151,10 @@ static bool do_node_params(struct data *data, const char *cmd, char *args, char
 | 
				
			||||||
		asprintf(error, "%s <object-id> [<param-id-name>]", cmd);
 | 
							asprintf(error, "%s <object-id> [<param-id-name>]", cmd);
 | 
				
			||||||
		return false;
 | 
							return false;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if (n == 2)
 | 
						if (n < 2)
 | 
				
			||||||
		param_id = SPA_PARAM_List;
 | 
							param_id = SPA_PARAM_List;
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
		param_id = SPA_PARAM_List;
 | 
							param_id = atoi(a[1]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	id = atoi(a[0]);
 | 
						id = atoi(a[0]);
 | 
				
			||||||
	global = pw_map_lookup(&rd->globals, id);
 | 
						global = pw_map_lookup(&rd->globals, id);
 | 
				
			||||||
| 
						 | 
					@ -1166,6 +1166,11 @@ static bool do_node_params(struct data *data, const char *cmd, char *args, char
 | 
				
			||||||
		asprintf(error, "object %d is not a node", atoi(a[0]));
 | 
							asprintf(error, "object %d is not a node", atoi(a[0]));
 | 
				
			||||||
		return false;
 | 
							return false;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						if (global->proxy == NULL) {
 | 
				
			||||||
 | 
							if (!bind_global(rd, global, error))
 | 
				
			||||||
 | 
								return false;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pw_node_proxy_enum_params((struct pw_node_proxy*)global->proxy,
 | 
						pw_node_proxy_enum_params((struct pw_node_proxy*)global->proxy,
 | 
				
			||||||
			param_id, 0, 0, NULL);
 | 
								param_id, 0, 0, NULL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue