mirror of
				https://github.com/yuezk/GlobalProtect-openconnect.git
				synced 2025-05-20 07:26:58 -04:00 
			
		
		
		
	refactor: update the function name
This commit is contained in:
		| @@ -12,10 +12,10 @@ pub(crate) struct Options { | ||||
|  | ||||
| #[link(name = "vpn")] | ||||
| extern "C" { | ||||
|     #[link_name = "start"] | ||||
|     #[link_name = "vpn_connect"] | ||||
|     pub(crate) fn connect(options: *const Options) -> ::std::os::raw::c_int; | ||||
|  | ||||
|     #[link_name = "stop"] | ||||
|     #[link_name = "vpn_disconnect"] | ||||
|     pub(crate) fn disconnect(); | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -46,7 +46,7 @@ static void setup_tun_handler(void *_vpninfo) | ||||
| } | ||||
|  | ||||
| /* Initialize VPN connection */ | ||||
| int start(const Options *options) | ||||
| int vpn_connect(const Options *options) | ||||
| { | ||||
|     struct openconnect_info *vpninfo; | ||||
|     struct utsname utsbuf; | ||||
| @@ -111,7 +111,7 @@ int start(const Options *options) | ||||
| } | ||||
|  | ||||
| /* Stop the VPN connection */ | ||||
| void stop() | ||||
| void vpn_disconnect() | ||||
| { | ||||
|     char cmd = OC_CMD_CANCEL; | ||||
|     if (write(g_cmd_pipe_fd, &cmd, 1) < 0) | ||||
|   | ||||
| @@ -5,8 +5,8 @@ typedef struct Options { | ||||
|   void *user_data; | ||||
| } Options; | ||||
|  | ||||
| int start(const Options *options); | ||||
| void stop(); | ||||
| int vpn_connect(const Options *options); | ||||
| void vpn_disconnect(); | ||||
|  | ||||
| extern void on_vpn_connected(int cmd_pipe_fd, void *user_data); | ||||
| extern void vpn_log(int level, const char *msg); | ||||
		Reference in New Issue
	
	Block a user