chansrv: no logic change, work on warning

This commit is contained in:
Jay Sorg 2013-07-02 00:45:40 -07:00
parent bddf48602d
commit 29420b3134
10 changed files with 32 additions and 87 deletions

View File

@ -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;

View File

@ -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) {}

View File

@ -272,17 +272,6 @@ clipboard_get_server_time(void)
return xevent.xproperty.time;
}
/*****************************************************************************/
/* 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)

View File

@ -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;

View File

@ -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
*

View File

@ -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

View File

@ -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;

View File

@ -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:"));

View File

@ -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;

View File

@ -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));