summaryrefslogtreecommitdiffstats
path: root/sesman/chansrv
diff options
context:
space:
mode:
Diffstat (limited to 'sesman/chansrv')
-rw-r--r--sesman/chansrv/chansrv.c44
-rw-r--r--sesman/chansrv/clipboard.c10
-rw-r--r--sesman/chansrv/sound.c2
3 files changed, 28 insertions, 28 deletions
diff --git a/sesman/chansrv/chansrv.c b/sesman/chansrv/chansrv.c
index 91765749..1abeeca6 100644
--- a/sesman/chansrv/chansrv.c
+++ b/sesman/chansrv/chansrv.c
@@ -527,20 +527,20 @@ nil_signal_handler(int sig)
/*****************************************************************************/
static int APP_CC
-get_display_num_from_display(char * display_text)
+get_display_num_from_display(char* display_text)
{
- int index = 0;
- int mode = 0;
- int host_index = 0;
- int disp_index = 0;
- int scre_index = 0;
- char host[256] = "";
- char disp[256] = "";
- char scre[256] = "";
-
- g_memset(host,0,256);
- g_memset(disp,0,256);
- g_memset(scre,0,256);
+ int index;
+ int mode;
+ int host_index;
+ int disp_index;
+ int scre_index;
+ char host[256];
+ char disp[256];
+ char scre[256];
+
+ g_memset(host, 0, 256);
+ g_memset(disp, 0, 256);
+ g_memset(scre, 0, 256);
index = 0;
host_index = 0;
@@ -637,28 +637,32 @@ main(int argc, char** argv)
int pid = 0;
char text[256] = "";
char* display_text = (char *)NULL;
- enum logReturns error ;
+ enum logReturns error;
char cfg_file[256];
g_init("xrdp-chansrv"); /* os_calls */
read_ini();
pid = g_getpid();
-
+
/* starting logging subsystem */
g_snprintf(cfg_file, 255, "%s/sesman.ini", XRDP_CFG_PATH);
error = log_start(cfg_file,"XRDP-Chansrv");
if (error != LOG_STARTUP_OK)
{
- char buf[256] ;
switch (error)
{
- case LOG_ERROR_MALLOC:
- g_printf("error on malloc. cannot start logging. quitting.\n");
+ case LOG_ERROR_MALLOC:
+ g_writeln("error on malloc. cannot start logging. quitting.");
break;
- case LOG_ERROR_FILE_OPEN:
- g_printf("error opening log file [%s]. quitting.\n", getLogFile(buf,255));
+ case LOG_ERROR_FILE_OPEN:
+ g_writeln("error opening log file [%s]. quitting.",
+ getLogFile(text, 255));
+ break;
+ default:
+ g_writeln("log_start error");
break;
}
+ g_deinit();
g_exit(1);
}
log_message(LOG_LEVEL_ALWAYS,"main: app started pid %d(0x%8.8x)", pid, pid);
diff --git a/sesman/chansrv/clipboard.c b/sesman/chansrv/clipboard.c
index 0afff037..a3e83e5f 100644
--- a/sesman/chansrv/clipboard.c
+++ b/sesman/chansrv/clipboard.c
@@ -30,6 +30,7 @@
#include "os_calls.h"
#include "chansrv.h"
#include "log.h"
+#include "clipboard.h"
static Atom g_clipboard_atom = 0;
static Atom g_clip_property_atom = 0;
@@ -101,10 +102,12 @@ static Time APP_CC
clipboard_get_server_time(void)
{
XEvent xevent;
+ unsigned char no_text[4];
/* append nothing */
+ no_text[0] = 0;
XChangeProperty(g_display, g_wnd, g_get_time_atom, XA_STRING, 8,
- PropModeAppend, "", 0);
+ PropModeAppend, no_text, 0);
/* wait for PropertyNotify */
do
{
@@ -280,7 +283,6 @@ clipboard_send_data_request(void)
struct stream* s;
int size;
int rv;
- int num_chars;
log_message(LOG_LEVEL_DEBUG,"clipboard_send_data_request:");
if (!g_got_format_announce)
@@ -492,8 +494,6 @@ static int APP_CC
clipboard_process_format_announce(struct stream* s, int clip_msg_status,
int clip_msg_len)
{
- Window owner;
-
log_message(LOG_LEVEL_DEBUG,"clipboard_process_format_announce: CLIPRDR_FORMAT_ANNOUNCE");
//g_hexdump(s->p, s->end - s->p);
clipboard_send_format_ack();
@@ -532,13 +532,11 @@ static int APP_CC
clipboard_process_data_response(struct stream* s, int clip_msg_status,
int clip_msg_len)
{
- XEvent xev;
XSelectionRequestEvent* lxev;
twchar* wtext;
twchar wchr;
int len;
int index;
- int wtext_size;
int data_in_len;
log_message(LOG_LEVEL_DEBUG,"clipboard_process_data_response: CLIPRDR_DATA_RESPONSE");
diff --git a/sesman/chansrv/sound.c b/sesman/chansrv/sound.c
index 3d68faff..6a86d97d 100644
--- a/sesman/chansrv/sound.c
+++ b/sesman/chansrv/sound.c
@@ -207,7 +207,6 @@ static int APP_CC
sound_process_training(struct stream* s, int size)
{
int time_diff;
- char buf[256];
print_got_here();
@@ -315,7 +314,6 @@ sound_init(void)
{
char port[256];
int error;
- pthread_t thread;
print_got_here();
LOG(0, ("sound_init:"));