mirror of https://github.com/OpenVPN/openvpn-gui
				
				
				
			Store daemon_state in connection struct
Signed-off-by: Selva Nair <selva.nair@gmail.com>pull/529/head
							parent
							
								
									4acafcf355
								
							
						
					
					
						commit
						47f950eca7
					
				|  | @ -309,6 +309,8 @@ OnStateChange(connection_t *c, char *data) | |||
|     /* notify the all windows in the thread of state change */ | ||||
|     EnumThreadWindows(GetCurrentThreadId(), NotifyStateChange, (LPARAM) state); | ||||
| 
 | ||||
|     strncpy_s(c->daemon_state, _countof(c->daemon_state), state, _TRUNCATE); | ||||
| 
 | ||||
|     if (strcmp(state, "CONNECTED") == 0) | ||||
|     { | ||||
|         parse_assigned_ip(c, pos + 1); | ||||
|  | @ -1846,6 +1848,7 @@ Cleanup (connection_t *c) | |||
|     if (c->exit_event) | ||||
|         CloseHandle (c->exit_event); | ||||
|     c->exit_event = NULL; | ||||
|     c->daemon_state[0] = '\0'; | ||||
| } | ||||
| /*
 | ||||
|  * Helper to position and scale widgets in status window using current dpi | ||||
|  |  | |||
|  | @ -165,6 +165,7 @@ struct connection { | |||
|     struct env_item *es;           /* Pointer to the head of config-specific env variables list */ | ||||
|     struct echo_msg echo_msg;      /* Message echo-ed from server or client config and related data */ | ||||
|     struct pkcs11_list pkcs11_list; | ||||
|     char daemon_state[20];         /* state of openvpn.ex: WAIT, AUTH, GET_CONFIG etc.. */ | ||||
| }; | ||||
| 
 | ||||
| /* All options used within OpenVPN GUI */ | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Selva Nair
						Selva Nair