mirror of
				https://git.kernel.org/pub/scm/network/wireless/iwd.git
				synced 2025-10-31 13:17:25 +01:00 
			
		
		
		
	main: Restore agent_exit call before main loop exit
This commit is contained in:
		
							parent
							
								
									176a5bcf76
								
							
						
					
					
						commit
						2901cb1169
					
				| @ -447,11 +447,14 @@ bool agent_init(struct l_dbus *dbus) | ||||
| 
 | ||||
| bool agent_exit(struct l_dbus *dbus) | ||||
| { | ||||
| 	if (default_agent) | ||||
| 		release_agent(default_agent); | ||||
| 
 | ||||
| 	l_dbus_unregister_object(dbus, IWD_AGENT_MANAGER_PATH); | ||||
| 	l_dbus_unregister_interface(dbus, IWD_AGENT_MANAGER_INTERFACE); | ||||
| 
 | ||||
| 	return true; | ||||
| } | ||||
| 
 | ||||
| void agent_shutdown(void) | ||||
| { | ||||
| 	if (default_agent) | ||||
| 		release_agent(default_agent); | ||||
| } | ||||
|  | ||||
| @ -35,6 +35,7 @@ typedef void (*agent_request_passphrase_func_t) (enum agent_result result, | ||||
| bool agent_init(struct l_dbus *dbus); | ||||
| bool agent_exit(struct l_dbus *dbus); | ||||
| bool agent_setup(struct l_dbus_interface *interface); | ||||
| void agent_shutdown(void); | ||||
| 
 | ||||
| unsigned int agent_request_passphrase(const char *path, | ||||
| 				agent_request_passphrase_func_t callback, | ||||
|  | ||||
| @ -246,3 +246,9 @@ bool dbus_exit(void) | ||||
| 
 | ||||
| 	return true; | ||||
| } | ||||
| 
 | ||||
| void dbus_shutdown(void) | ||||
| { | ||||
| 	/* Allow AgentManager to send a Release call before disconnecting */ | ||||
| 	agent_shutdown(); | ||||
| } | ||||
|  | ||||
| @ -63,3 +63,4 @@ struct l_dbus_message *dbus_error_not_implemented(struct l_dbus_message *msg); | ||||
| 
 | ||||
| bool dbus_init(bool enable_debug, bool use_kdbus); | ||||
| bool dbus_exit(void); | ||||
| void dbus_shutdown(void); | ||||
|  | ||||
| @ -36,7 +36,6 @@ | ||||
| #include "src/device.h" | ||||
| #include "src/wiphy.h" | ||||
| #include "src/dbus.h" | ||||
| #include "src/agent.h" | ||||
| #include "src/network.h" | ||||
| #include "src/eapol.h" | ||||
| #include "src/scan.h" | ||||
| @ -59,6 +58,8 @@ static void signal_handler(struct l_signal *signal, uint32_t signo, | ||||
| 	case SIGTERM: | ||||
| 		l_info("Terminate"); | ||||
| 
 | ||||
| 		dbus_shutdown(); | ||||
| 
 | ||||
| 		timeout = l_timeout_create(1, main_loop_quit, NULL, NULL); | ||||
| 		break; | ||||
| 	} | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Andrew Zaborowski
						Andrew Zaborowski