|
|
@ -26,6 +26,9 @@
|
|
|
|
#include "log.h"
|
|
|
|
#include "log.h"
|
|
|
|
#include "xrdp_configure_options.h"
|
|
|
|
#include "xrdp_configure_options.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <netdb.h>
|
|
|
|
|
|
|
|
#include "libraptorsmiface.h"
|
|
|
|
|
|
|
|
|
|
|
|
#if !defined(PACKAGE_VERSION)
|
|
|
|
#if !defined(PACKAGE_VERSION)
|
|
|
|
#define PACKAGE_VERSION "???"
|
|
|
|
#define PACKAGE_VERSION "???"
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
@ -641,6 +644,17 @@ main(int argc, char **argv)
|
|
|
|
/* end of daemonizing code */
|
|
|
|
/* end of daemonizing code */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Update statistics
|
|
|
|
|
|
|
|
char hostname[512];
|
|
|
|
|
|
|
|
gethostname(hostname, 512);
|
|
|
|
|
|
|
|
struct hostent* hostinfo;
|
|
|
|
|
|
|
|
if((hostinfo=gethostbyname(hostname))) {
|
|
|
|
|
|
|
|
raptor_sm_stats_report_server_start(hostinfo->h_name);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
raptor_sm_stats_report_server_start(hostname);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
g_threadid = tc_get_threadid();
|
|
|
|
g_threadid = tc_get_threadid();
|
|
|
|
g_listen = xrdp_listen_create();
|
|
|
|
g_listen = xrdp_listen_create();
|
|
|
|
g_signal_user_interrupt(xrdp_shutdown); /* SIGINT */
|
|
|
|
g_signal_user_interrupt(xrdp_shutdown); /* SIGINT */
|
|
|
@ -686,6 +700,13 @@ main(int argc, char **argv)
|
|
|
|
log_end();
|
|
|
|
log_end();
|
|
|
|
g_deinit();
|
|
|
|
g_deinit();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (hostinfo) {
|
|
|
|
|
|
|
|
raptor_sm_stats_report_server_stop(hostinfo->h_name);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
raptor_sm_stats_report_server_stop(hostname);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (exit_status == 0)
|
|
|
|
if (exit_status == 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
g_exit(0);
|
|
|
|
g_exit(0);
|
|
|
|