mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-10-12 01:26:48 +08:00
occtl: move ctl.h in occtl/ and fixed args.def to include version.inc
This commit is contained in:
+1
-1
@@ -74,7 +74,7 @@ ocserv_SOURCES = main.c main-auth.c worker-vpn.c worker-auth.c tlslib.c \
|
||||
sec-mod-sup-config.c sec-mod-sup-config.h \
|
||||
sup-config/file.c sup-config/file.h main-sec-mod-cmd.c \
|
||||
sup-config/radius.c sup-config/radius.h \
|
||||
worker-bandwidth.c worker-bandwidth.h ctl.h main-ctl.h \
|
||||
worker-bandwidth.c worker-bandwidth.h main-ctl.h \
|
||||
vasprintf.c vasprintf.h worker-proxyproto.c \
|
||||
proc-search.c proc-search.h http-heads.h ip-util.c ip-util.h \
|
||||
main-ban.c main-ban.h common-config.h base64-helper.c base64-helper.h \
|
||||
|
||||
+1
-1
@@ -50,8 +50,8 @@
|
||||
#include <vpn.h>
|
||||
#include <cookies.h>
|
||||
#include <main.h>
|
||||
#include <ctl.h>
|
||||
#include <tlslib.h>
|
||||
#include <occtl/ctl.h>
|
||||
#include "common-config.h"
|
||||
|
||||
#define OLD_DEFAULT_CFG_FILE "/etc/ocserv.conf"
|
||||
|
||||
+1
-11
@@ -1,7 +1,7 @@
|
||||
#ifndef MAIN_CTL_HANDLER_H
|
||||
# define MAIN_CTL_HANDLER_H
|
||||
|
||||
#include <ctl.h>
|
||||
#include <occtl/ctl.h>
|
||||
|
||||
int ctl_handler_init(main_server_st* s);
|
||||
void ctl_handler_deinit(main_server_st* s);
|
||||
@@ -9,14 +9,4 @@ void ctl_handler_deinit(main_server_st* s);
|
||||
int ctl_handler_set_fds(main_server_st* s, fd_set *rd_set, fd_set *wr_set);
|
||||
void ctl_handler_run_pending(main_server_st* s, fd_set *rd_set, fd_set *wr_set);
|
||||
|
||||
inline static void terminate_proc(main_server_st *s, proc_st *proc)
|
||||
{
|
||||
/* if it has an IP, send a signal so that we cleanup
|
||||
* and get stats properly */
|
||||
if (proc->pid != -1 && proc->pid != 0)
|
||||
kill(proc->pid, SIGTERM);
|
||||
else
|
||||
remove_proc(s, proc, RPROC_KILL);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
+10
@@ -281,6 +281,16 @@ struct proc_st *new_proc(main_server_st * s, pid_t pid, int cmd_fd,
|
||||
void remove_proc(main_server_st* s, struct proc_st *proc, unsigned flags);
|
||||
void proc_to_zombie(main_server_st* s, struct proc_st *proc);
|
||||
|
||||
inline static void terminate_proc(main_server_st *s, proc_st *proc)
|
||||
{
|
||||
/* if it has an IP, send a signal so that we cleanup
|
||||
* and get stats properly */
|
||||
if (proc->pid != -1 && proc->pid != 0)
|
||||
kill(proc->pid, SIGTERM);
|
||||
else
|
||||
remove_proc(s, proc, RPROC_KILL);
|
||||
}
|
||||
|
||||
void put_into_cgroup(main_server_st * s, const char* cgroup, pid_t pid);
|
||||
|
||||
inline static
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ long-opts;
|
||||
no-misuse-usage;
|
||||
short-usage = "Usage: occtl [options] [command]\nocctl --help for usage instructions.\n";
|
||||
explain = "";
|
||||
#include version.inc
|
||||
#include ../version.inc
|
||||
|
||||
detail = "Openconnect VPN server control (occtl) is a tool to control
|
||||
the ocserv VPN server.";
|
||||
|
||||
Reference in New Issue
Block a user