minor fixes and indent
This commit is contained in:
parent
5603962061
commit
8c73bc31cb
@ -44,7 +44,7 @@ env_check_password_file(char* filename, char* password)
|
|||||||
rfbDesKey(g_fixedkey, 0);
|
rfbDesKey(g_fixedkey, 0);
|
||||||
rfbDes((unsigned char*)encryptedPasswd, (unsigned char*)encryptedPasswd);
|
rfbDes((unsigned char*)encryptedPasswd, (unsigned char*)encryptedPasswd);
|
||||||
fd = g_file_open(filename);
|
fd = g_file_open(filename);
|
||||||
if (fd == 0)
|
if (fd == -1)
|
||||||
{
|
{
|
||||||
log_message(LOG_LEVEL_WARNING, "can't read vnc password file - %s",
|
log_message(LOG_LEVEL_WARNING, "can't read vnc password file - %s",
|
||||||
filename);
|
filename);
|
||||||
|
@ -41,7 +41,7 @@ extern int thread_sck;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static void DEFAULT_CC
|
static void DEFAULT_CC
|
||||||
sesman_main_loop()
|
sesman_main_loop(void)
|
||||||
{
|
{
|
||||||
int in_sck;
|
int in_sck;
|
||||||
int error;
|
int error;
|
||||||
@ -112,7 +112,7 @@ main(int argc, char** argv)
|
|||||||
{
|
{
|
||||||
/* starts sesman not daemonized */
|
/* starts sesman not daemonized */
|
||||||
g_printf("starting sesman in foregroud...\n");
|
g_printf("starting sesman in foregroud...\n");
|
||||||
daemon=0;
|
daemon = 0;
|
||||||
}
|
}
|
||||||
else if ((2 == argc) && ((0 == g_strcasecmp(argv[1], "--help")) ||
|
else if ((2 == argc) && ((0 == g_strcasecmp(argv[1], "--help")) ||
|
||||||
(0 == g_strcasecmp(argv[1], "-h"))))
|
(0 == g_strcasecmp(argv[1], "-h"))))
|
||||||
@ -211,7 +211,7 @@ main(int argc, char** argv)
|
|||||||
/* start of daemonizing code */
|
/* start of daemonizing code */
|
||||||
g_pid = g_fork();
|
g_pid = g_fork();
|
||||||
|
|
||||||
if (0!=g_pid)
|
if (0 != g_pid)
|
||||||
{
|
{
|
||||||
g_exit(0);
|
g_exit(0);
|
||||||
}
|
}
|
||||||
@ -252,7 +252,7 @@ main(int argc, char** argv)
|
|||||||
g_exit(1);
|
g_exit(1);
|
||||||
}
|
}
|
||||||
g_sprintf(pid_s, "%d", g_pid);
|
g_sprintf(pid_s, "%d", g_pid);
|
||||||
g_file_write(fd, pid_s, g_strlen(pid_s)+1);
|
g_file_write(fd, pid_s, g_strlen(pid_s) + 1);
|
||||||
g_file_close(fd);
|
g_file_close(fd);
|
||||||
|
|
||||||
/* start program main loop */
|
/* start program main loop */
|
||||||
|
@ -39,7 +39,7 @@ int thread_sck;
|
|||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
int DEFAULT_CC
|
int DEFAULT_CC
|
||||||
thread_sighandler_start()
|
thread_sighandler_start(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
sigset_t sigmask;
|
sigset_t sigmask;
|
||||||
@ -65,7 +65,7 @@ thread_sighandler_start()
|
|||||||
ret = pthread_create(&thread_sighandler, NULL, sig_handler_thread, "");
|
ret = pthread_create(&thread_sighandler, NULL, sig_handler_thread, "");
|
||||||
pthread_detach(thread_sighandler);
|
pthread_detach(thread_sighandler);
|
||||||
|
|
||||||
if (ret==0)
|
if (ret == 0)
|
||||||
{
|
{
|
||||||
log_message(LOG_LEVEL_INFO, "signal handler thread started successfully");
|
log_message(LOG_LEVEL_INFO, "signal handler thread started successfully");
|
||||||
return 0;
|
return 0;
|
||||||
@ -93,7 +93,7 @@ thread_sighandler_start()
|
|||||||
#ifdef JUST_TO_AVOID_COMPILER_ERRORS
|
#ifdef JUST_TO_AVOID_COMPILER_ERRORS
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
int DEFAULT_CC
|
int DEFAULT_CC
|
||||||
thread_session_update_start()
|
thread_session_update_start(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
//starts the session update thread
|
//starts the session update thread
|
||||||
@ -146,7 +146,7 @@ thread_scp_start(int skt)
|
|||||||
//ret = pthread_create(&th, NULL, scp_process_start, (void*) (&thread_sck));
|
//ret = pthread_create(&th, NULL, scp_process_start, (void*) (&thread_sck));
|
||||||
pthread_detach(th);
|
pthread_detach(th);
|
||||||
|
|
||||||
if (ret==0)
|
if (ret == 0)
|
||||||
{
|
{
|
||||||
log_message(LOG_LEVEL_INFO, "scp thread on sck %d started successfully", skt);
|
log_message(LOG_LEVEL_INFO, "scp thread on sck %d started successfully", skt);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user