mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	ipc: Return correct status in ipc reply.
This commit is contained in:
		
							parent
							
								
									b093a5d16f
								
							
						
					
					
						commit
						544c6c412a
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -222,7 +222,7 @@ void ipc_client_handle_command(struct ipc_client *client) {
 | 
				
			||||||
	case IPC_COMMAND:
 | 
						case IPC_COMMAND:
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		buf[client->payload_length] = '\0';
 | 
							buf[client->payload_length] = '\0';
 | 
				
			||||||
		bool success = handle_command(buf);
 | 
							bool success = (handle_command(buf) == CMD_SUCCESS);
 | 
				
			||||||
		char reply[64];
 | 
							char reply[64];
 | 
				
			||||||
		int length = snprintf(reply, sizeof(reply), "{\"success\":%s}", success ? "true" : "false");
 | 
							int length = snprintf(reply, sizeof(reply), "{\"success\":%s}", success ? "true" : "false");
 | 
				
			||||||
		ipc_send_reply(client, reply, (uint32_t) length);
 | 
							ipc_send_reply(client, reply, (uint32_t) length);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue