diff options
author | jsorg71 <jsorg71> | 2009-08-29 21:40:15 +0000 |
---|---|---|
committer | jsorg71 <jsorg71> | 2009-08-29 21:40:15 +0000 |
commit | 30f87388bb5f28d83f08941d384a48939347f59a (patch) | |
tree | 86a618486ca1dbe24c37d19fdaf1f86b9a5330d2 | |
parent | 64fde0e24fa797afdff513886da57a5a68ef6c5f (diff) | |
download | xrdp-proprietary-30f87388bb5f28d83f08941d384a48939347f59a.tar.gz xrdp-proprietary-30f87388bb5f28d83f08941d384a48939347f59a.zip |
clipboard
-rw-r--r-- | sesman/chansrv/clipboard.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sesman/chansrv/clipboard.c b/sesman/chansrv/clipboard.c index 9b3839db..4f9f59bb 100644 --- a/sesman/chansrv/clipboard.c +++ b/sesman/chansrv/clipboard.c @@ -58,9 +58,9 @@ static struct stream* g_ins = 0; static XSelectionRequestEvent g_selection_request_event[16]; static int g_selection_request_event_count = 0; -static char* g_data_in; -static int g_data_in_size; -static int g_data_in_time; +static char* g_data_in = 0; +static int g_data_in_size = 0; +static int g_data_in_time = 0; extern int g_cliprdr_chan_id; /* in chansrv.c */ extern Display* g_display; /* in chansrv.c */ @@ -423,7 +423,7 @@ clipboard_process_data_response(struct stream* s, int clip_msg_status, { return 0; } - g_hexdump(s->p, len); + //g_hexdump(s->p, len); wtext = (twchar*)g_malloc(((len / 2) + 1) * sizeof(twchar), 0); if (wtext == 0) { @@ -441,11 +441,13 @@ clipboard_process_data_response(struct stream* s, int clip_msg_status, index++; } wtext[index] = 0; + g_free(g_data_in); + g_data_in = 0; + g_data_in_size = 0; + g_data_in_time = 0; len = g_wcstombs(0, wtext, 0); if (len >= 0) { - g_free(g_data_in); - g_data_in_size = 0; g_data_in = (char*)g_malloc(len + 16, 0); if (g_data_in == 0) { |