refactor: rename to vpn_options

This commit is contained in:
Kevin Yue 2023-05-24 10:02:08 +08:00
parent 8de183a53d
commit 77fda0f527
3 changed files with 5 additions and 5 deletions

View File

@ -128,7 +128,7 @@ impl Vpn {
pub async fn disconnect(&self) {
if self.status().await == VpnStatus::Disconnected {
info!("VPN already disconnected, skipping disconnect");
info!("VPN is not connected, nothing to do");
return;
}

View File

@ -45,7 +45,7 @@ static void setup_tun_handler(void *_vpninfo)
}
/* Initialize VPN connection */
int vpn_connect(const Options *options)
int vpn_connect(const vpn_options *options)
{
struct openconnect_info *vpninfo;
struct utsname utsbuf;

View File

@ -3,15 +3,15 @@
#include <stdarg.h>
#include <openconnect.h>
typedef struct Options
typedef struct vpn_options
{
const char *server;
const char *cookie;
const char *script;
void *user_data;
} Options;
} vpn_options;
int vpn_connect(const Options *options);
int vpn_connect(const vpn_options *options);
void vpn_disconnect();
extern void on_vpn_connected(int cmd_pipe_fd, void *user_data);