diff options
Diffstat (limited to 'sesman/chansrv')
-rw-r--r-- | sesman/chansrv/chansrv.c | 1 | ||||
-rw-r--r-- | sesman/chansrv/chansrv_fuse.c | 18 | ||||
-rw-r--r-- | sesman/chansrv/clipboard.c | 11 | ||||
-rw-r--r-- | sesman/chansrv/devredir.c | 10 | ||||
-rw-r--r-- | sesman/chansrv/drdynvc.c | 12 | ||||
-rw-r--r-- | sesman/chansrv/drdynvc.h | 20 | ||||
-rw-r--r-- | sesman/chansrv/irp.c | 2 | ||||
-rw-r--r-- | sesman/chansrv/rail.c | 35 | ||||
-rw-r--r-- | sesman/chansrv/smartcard.c | 8 | ||||
-rw-r--r-- | sesman/chansrv/sound.c | 2 |
10 files changed, 32 insertions, 87 deletions
diff --git a/sesman/chansrv/chansrv.c b/sesman/chansrv/chansrv.c index bd9c27c5..388d0273 100644 --- a/sesman/chansrv/chansrv.c +++ b/sesman/chansrv/chansrv.c @@ -33,6 +33,7 @@ #include "rail.h" #include "xcommon.h" #include "chansrv_fuse.h" +#include "drdynvc.h" static struct trans *g_lis_trans = 0; static struct trans *g_con_trans = 0; diff --git a/sesman/chansrv/chansrv_fuse.c b/sesman/chansrv/chansrv_fuse.c index 48936910..661d0bca 100644 --- a/sesman/chansrv/chansrv_fuse.c +++ b/sesman/chansrv/chansrv_fuse.c @@ -59,15 +59,15 @@ char g_fuse_clipboard_path[256] = ""; /* for clipboard use */ #include "chansrv_fuse.h" /* dummy calls when XRDP_FUSE is not defined */ -int xfuse_init() {} -int xfuse_deinit() {} -int xfuse_check_wait_objs(void) {} -int xfuse_get_wait_objs(tbus *objs, int *count, int *timeout) {} -int xfuse_clear_clip_dir(void) {} -int xfuse_file_contents_range(int stream_id, char *data, int data_bytes) {} -int xfuse_file_contents_size(int stream_id, int file_size) {} -int xfuse_add_clip_dir_item(char *filename, int flags, int size, int lindex) {} -int xfuse_create_share(tui32 device_id, char *dirname) {} +int xfuse_init() { return 0; } +int xfuse_deinit() { return 0; } +int xfuse_check_wait_objs(void) { return 0; } +int xfuse_get_wait_objs(tbus *objs, int *count, int *timeout) { return 0; } +int xfuse_clear_clip_dir(void) { return 0; } +int xfuse_file_contents_range(int stream_id, char *data, int data_bytes) { return 0; } +int xfuse_file_contents_size(int stream_id, int file_size) { return 0; } +int xfuse_add_clip_dir_item(char *filename, int flags, int size, int lindex) { return 0; } +int xfuse_create_share(tui32 device_id, char *dirname) { return 0; } void xfuse_devredir_cb_open_file(void *vp, tui32 IoStatus, tui32 DeviceId, tui32 FileId) {} void xfuse_devredir_cb_write_file(void *vp, char *buf, size_t length) {} void xfuse_devredir_cb_read_file(void *vp, char *buf, size_t length) {} diff --git a/sesman/chansrv/clipboard.c b/sesman/chansrv/clipboard.c index 89dbdbbb..3aac8dbc 100644 --- a/sesman/chansrv/clipboard.c +++ b/sesman/chansrv/clipboard.c @@ -273,17 +273,6 @@ clipboard_get_server_time(void) } /*****************************************************************************/ -/* returns time in miliseconds - this is like g_time2 in os_calls, but not miliseconds since machine was - up, something else - this is a time value similar to what the xserver uses */ -static int APP_CC -clipboard_get_local_time(void) -{ - return g_time3(); -} - -/*****************************************************************************/ static int APP_CC clipboard_find_format_id(int format_id) { diff --git a/sesman/chansrv/devredir.c b/sesman/chansrv/devredir.c index 067738ac..8de28e43 100644 --- a/sesman/chansrv/devredir.c +++ b/sesman/chansrv/devredir.c @@ -296,7 +296,7 @@ dev_redir_check_wait_objs(void) * @brief let client know our capabilities *****************************************************************************/ -void dev_redir_send_server_core_cap_req() +void dev_redir_send_server_core_cap_req(void) { struct stream *s; int bytes; @@ -340,8 +340,8 @@ void dev_redir_send_server_core_cap_req() /* setup file system capability */ xstream_wr_u16_le(s, CAP_DRIVE_TYPE); /* CapabilityType */ xstream_wr_u16_le(s, 8); /* CapabilityLength - len of this */ - /* CAPABILITY_SET in bytes, inc */ - /* the header */ + /* CAPABILITY_SET in bytes, inc */ + /* the header */ xstream_wr_u32_le(s, 2); /* Version */ /* setup smart card capability */ @@ -356,7 +356,7 @@ void dev_redir_send_server_core_cap_req() xstream_free(s); } -void dev_redir_send_server_clientID_confirm() +void dev_redir_send_server_clientID_confirm(void) { struct stream *s; int bytes; @@ -377,7 +377,7 @@ void dev_redir_send_server_clientID_confirm() xstream_free(s); } -void dev_redir_send_server_user_logged_on() +void dev_redir_send_server_user_logged_on(void) { struct stream *s; int bytes; diff --git a/sesman/chansrv/drdynvc.c b/sesman/chansrv/drdynvc.c index 6bcac45e..af86ea57 100644 --- a/sesman/chansrv/drdynvc.c +++ b/sesman/chansrv/drdynvc.c @@ -21,6 +21,18 @@ int g_drdynvc_chan_id; int g_drdynvc_inited = 0; +static int APP_CC drdynvc_send_capability_request(uint16_t version); +static int APP_CC drdynvc_process_capability_response(struct stream* s, + unsigned char cmd); +static int APP_CC drdynvc_process_open_channel_response(struct stream *s, + unsigned char cmd); +static int APP_CC drdynvc_process_close_channel_response(struct stream *s, + unsigned char cmd); +static int APP_CC drdynvc_process_data_first(struct stream* s, unsigned char cmd); +static int APP_CC drdynvc_process_data(struct stream* s, unsigned char cmd); +static int APP_CC drdynvc_insert_uint_124(struct stream *s, uint32_t val); +static int APP_CC drdynvc_get_chan_id(struct stream *s, char cmd, uint32_t *chan_id_p); + /** * bring up dynamic virtual channel * diff --git a/sesman/chansrv/drdynvc.h b/sesman/chansrv/drdynvc.h index fcf46249..15398867 100644 --- a/sesman/chansrv/drdynvc.h +++ b/sesman/chansrv/drdynvc.h @@ -57,31 +57,11 @@ #define CMD_DVC_CAPABILITY 0x50 int APP_CC drdynvc_init(void); - -static int APP_CC drdynvc_send_capability_request(uint16_t version); -static int APP_CC drdynvc_process_capability_response(struct stream* s, - unsigned char cmd); - int APP_CC drdynvc_send_open_channel_request(int chan_pri, unsigned int chan_id, char *chan_name); - -static int APP_CC drdynvc_process_open_channel_response(struct stream *s, - unsigned char cmd); - int APP_CC drdynvc_send_close_channel_request(unsigned int chan_id); - -static int APP_CC drdynvc_process_close_channel_response(struct stream *s, - unsigned char cmd); - int APP_CC drdynvc_write_data(uint32_t chan_id, char *data, int data_size); - int APP_CC drdynvc_data_in(struct stream* s, int chan_id, int chan_flags, int length, int total_length); -static int APP_CC drdynvc_process_data_first(struct stream* s, unsigned char cmd); -static int APP_CC drdynvc_process_data(struct stream* s, unsigned char cmd); - -static int APP_CC drdynvc_insert_uint_124(struct stream *s, uint32_t val); -static int APP_CC drdynvc_get_chan_id(struct stream *s, char cmd, uint32_t *chan_id_p); - #endif diff --git a/sesman/chansrv/irp.c b/sesman/chansrv/irp.c index fcf3e537..2a5209d8 100644 --- a/sesman/chansrv/irp.c +++ b/sesman/chansrv/irp.c @@ -119,7 +119,7 @@ IRP * devredir_irp_clone(IRP *irp) next = new_irp->next; /* copy all members */ - memcpy(new_irp, irp, sizeof(IRP)); + g_memcpy(new_irp, irp, sizeof(IRP)); /* restore link pointers */ new_irp->prev = prev; diff --git a/sesman/chansrv/rail.c b/sesman/chansrv/rail.c index 1ea8d73a..cfa3c5de 100644 --- a/sesman/chansrv/rail.c +++ b/sesman/chansrv/rail.c @@ -101,33 +101,6 @@ static int g_rail_running = 1; /* Perform the default action of the window's system menu. */ #define SC_DEFAULT 0xF160 -/******************************************************************************/ -static int APP_CC -is_window_valid_child_of_root(unsigned int window_id) -{ - int found; - unsigned int i; - unsigned int nchild; - Window r; - Window p; - Window *children; - - found = 0; - XQueryTree(g_display, g_root_window, &r, &p, &children, &nchild); - - for (i = 0; i < nchild; i++) - { - if (window_id == children[i]) - { - found = 1; - break; - } - } - - XFree(children); - return found; -} - /*****************************************************************************/ static int APP_CC rail_send_init(void) @@ -258,7 +231,6 @@ read_uni(struct stream *s, int num_chars) static int APP_CC rail_process_exec(struct stream *s, int size) { - int pid; int flags; int ExeOrFileLength; int WorkingDirLength; @@ -624,13 +596,6 @@ rail_xevent(void *xevent) XEvent *lxevent; XWindowChanges xwc; int rv; - int nchildren_return = 0; - Window root_return; - Window parent_return; - Window *children_return; - Window wreturn; - int revert_to; - XWindowAttributes wnd_attributes; LOG(10, ("chansrv::rail_xevent:")); diff --git a/sesman/chansrv/smartcard.c b/sesman/chansrv/smartcard.c index 3fdb6723..19650be1 100644 --- a/sesman/chansrv/smartcard.c +++ b/sesman/chansrv/smartcard.c @@ -140,8 +140,8 @@ static void scard_send_EstablishContext(IRP *irp); static void scard_send_ListReaders(IRP *irp, int wide); static struct stream *scard_make_new_ioctl(IRP *irp, tui32 ioctl); static int scard_add_new_device(tui32 device_id); -static int scard_get_free_slot(); -static void scard_release_resources(); +static int scard_get_free_slot(void); +static void scard_release_resources(void); /****************************************************************************** ** non static functions ** @@ -488,7 +488,7 @@ static int scard_add_new_device(tui32 device_id) * @return index of first unused entry in smartcards or -1 if smartcards is full *****************************************************************************/ -static int scard_get_free_slot() +static int scard_get_free_slot(void) { int i; @@ -509,7 +509,7 @@ static int scard_get_free_slot() * Release resources prior to shutting down *****************************************************************************/ -static void scard_release_resources() +static void scard_release_resources(void) { int i; diff --git a/sesman/chansrv/sound.c b/sesman/chansrv/sound.c index 2b027a82..9ee3c8c3 100644 --- a/sesman/chansrv/sound.c +++ b/sesman/chansrv/sound.c @@ -194,8 +194,6 @@ sound_process_format(int aindex, int wFormatTag, int nChannels, int nBlockAlign, int wBitsPerSample, int cbSize, char *data) { - int lindex; - LOG(0, ("sound_process_format:")); LOG(0, (" wFormatTag %d", wFormatTag)); LOG(0, (" nChannels %d", nChannels)); |