improvements for when a session is disconnected
This commit is contained in:
parent
90ce47855c
commit
9a12982a69
@ -177,6 +177,13 @@ process_message_channel_setup(struct stream* s)
|
|||||||
int rv;
|
int rv;
|
||||||
struct chan_item* ci;
|
struct chan_item* ci;
|
||||||
|
|
||||||
|
g_num_chan_items = 0;
|
||||||
|
g_cliprdr_index = -1;
|
||||||
|
g_rdpsnd_index = -1;
|
||||||
|
g_rdpdr_index = -1;
|
||||||
|
g_cliprdr_chan_id = -1;
|
||||||
|
g_rdpsnd_chan_id = -1;
|
||||||
|
g_rdpdr_chan_id = -1;
|
||||||
LOG(10, ("process_message_channel_setup:"));
|
LOG(10, ("process_message_channel_setup:"));
|
||||||
in_uint16_le(s, num_chans);
|
in_uint16_le(s, num_chans);
|
||||||
LOG(10, ("process_message_channel_setup: num_chans %d", num_chans));
|
LOG(10, ("process_message_channel_setup: num_chans %d", num_chans));
|
||||||
@ -449,6 +456,9 @@ channel_thread_loop(void* in_val)
|
|||||||
{
|
{
|
||||||
LOG(0, ("channel_thread_loop: "
|
LOG(0, ("channel_thread_loop: "
|
||||||
"trans_check_wait_objs error resetting"));
|
"trans_check_wait_objs error resetting"));
|
||||||
|
clipboard_deinit();
|
||||||
|
sound_deinit();
|
||||||
|
dev_redir_deinit();
|
||||||
/* delete g_con_trans */
|
/* delete g_con_trans */
|
||||||
trans_delete(g_con_trans);
|
trans_delete(g_con_trans);
|
||||||
g_con_trans = 0;
|
g_con_trans = 0;
|
||||||
|
@ -142,6 +142,7 @@ clipboard_init(void)
|
|||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
clipboard_deinit();
|
||||||
rv = 0;
|
rv = 0;
|
||||||
/* setting the error handlers can cause problem when shutting down
|
/* setting the error handlers can cause problem when shutting down
|
||||||
chansrv on some xlibs */
|
chansrv on some xlibs */
|
||||||
@ -246,19 +247,27 @@ clipboard_init(void)
|
|||||||
int APP_CC
|
int APP_CC
|
||||||
clipboard_deinit(void)
|
clipboard_deinit(void)
|
||||||
{
|
{
|
||||||
if (!g_clip_up)
|
if (g_x_wait_obj != 0)
|
||||||
{
|
{
|
||||||
return 0;
|
g_delete_wait_obj_from_socket(g_x_wait_obj);
|
||||||
|
g_x_wait_obj = 0;
|
||||||
|
}
|
||||||
|
if (g_wnd != 0)
|
||||||
|
{
|
||||||
|
XDestroyWindow(g_display, g_wnd);
|
||||||
|
g_wnd = 0;
|
||||||
}
|
}
|
||||||
g_delete_wait_obj_from_socket(g_x_wait_obj);
|
|
||||||
g_x_wait_obj = 0;
|
|
||||||
XDestroyWindow(g_display, g_wnd);
|
|
||||||
g_wnd = 0;
|
|
||||||
g_x_socket = 0;
|
g_x_socket = 0;
|
||||||
g_free(g_last_clip_data);
|
g_free(g_last_clip_data);
|
||||||
g_last_clip_data = 0;
|
g_last_clip_data = 0;
|
||||||
g_last_clip_size = 0;
|
g_last_clip_size = 0;
|
||||||
free_stream(g_ins);
|
free_stream(g_ins);
|
||||||
|
g_ins = 0;
|
||||||
|
if (g_display != 0)
|
||||||
|
{
|
||||||
|
XCloseDisplay(g_display);
|
||||||
|
g_display = 0;
|
||||||
|
}
|
||||||
g_clip_up = 0;
|
g_clip_up = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user