minor fixes and indent

ulab-original
jsorg71 18 years ago
parent 5603962061
commit 8c73bc31cb

@ -44,7 +44,7 @@ env_check_password_file(char* filename, char* password)
rfbDesKey(g_fixedkey, 0);
rfbDes((unsigned char*)encryptedPasswd, (unsigned char*)encryptedPasswd);
fd = g_file_open(filename);
if (fd == 0)
if (fd == -1)
{
log_message(LOG_LEVEL_WARNING, "can't read vnc password file - %s",
filename);

@ -41,7 +41,7 @@ extern int thread_sck;
*
*/
static void DEFAULT_CC
sesman_main_loop()
sesman_main_loop(void)
{
int in_sck;
int error;
@ -112,7 +112,7 @@ main(int argc, char** argv)
{
/* starts sesman not daemonized */
g_printf("starting sesman in foregroud...\n");
daemon=0;
daemon = 0;
}
else if ((2 == argc) && ((0 == g_strcasecmp(argv[1], "--help")) ||
(0 == g_strcasecmp(argv[1], "-h"))))
@ -211,7 +211,7 @@ main(int argc, char** argv)
/* start of daemonizing code */
g_pid = g_fork();
if (0!=g_pid)
if (0 != g_pid)
{
g_exit(0);
}
@ -252,7 +252,7 @@ main(int argc, char** argv)
g_exit(1);
}
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);
/* start program main loop */

@ -39,7 +39,7 @@ int thread_sck;
/******************************************************************************/
int DEFAULT_CC
thread_sighandler_start()
thread_sighandler_start(void)
{
int ret;
sigset_t sigmask;
@ -65,7 +65,7 @@ thread_sighandler_start()
ret = pthread_create(&thread_sighandler, NULL, sig_handler_thread, "");
pthread_detach(thread_sighandler);
if (ret==0)
if (ret == 0)
{
log_message(LOG_LEVEL_INFO, "signal handler thread started successfully");
return 0;
@ -93,7 +93,7 @@ thread_sighandler_start()
#ifdef JUST_TO_AVOID_COMPILER_ERRORS
/******************************************************************************/
int DEFAULT_CC
thread_session_update_start()
thread_session_update_start(void)
{
int ret;
//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));
pthread_detach(th);
if (ret==0)
if (ret == 0)
{
log_message(LOG_LEVEL_INFO, "scp thread on sck %d started successfully", skt);
return 0;

Loading…
Cancel
Save