diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2013-07-23 20:57:38 -0700 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2013-07-23 20:57:38 -0700 |
commit | 17bf2abe309c5e146ae53c25e634089842e847f1 (patch) | |
tree | 2253315bda15a94ce587ac8afcabbf2523d2c179 /sesman | |
parent | af8ca90784389f5b24df8721b34155b4a3ac12dd (diff) | |
download | xrdp-proprietary-17bf2abe309c5e146ae53c25e634089842e847f1.tar.gz xrdp-proprietary-17bf2abe309c5e146ae53c25e634089842e847f1.zip |
xorg driver, include cleanup
Diffstat (limited to 'sesman')
-rw-r--r-- | sesman/chansrv/chansrv.h | 2 | ||||
-rw-r--r-- | sesman/chansrv/clipboard.h | 17 | ||||
-rw-r--r-- | sesman/chansrv/clipboard_common.h | 8 | ||||
-rw-r--r-- | sesman/chansrv/devredir.c | 88 | ||||
-rw-r--r-- | sesman/chansrv/drdynvc.c | 9 | ||||
-rw-r--r-- | sesman/chansrv/irp.h | 14 | ||||
-rw-r--r-- | sesman/chansrv/smartcard.c | 38 |
7 files changed, 99 insertions, 77 deletions
diff --git a/sesman/chansrv/chansrv.h b/sesman/chansrv/chansrv.h index a6b88a35..bca30ca4 100644 --- a/sesman/chansrv/chansrv.h +++ b/sesman/chansrv/chansrv.h @@ -57,7 +57,7 @@ struct xrdp_api_data int APP_CC send_channel_data(int chan_id, char *data, int size); int APP_CC main_cleanup(void); int APP_CC find_empty_slot_in_dvc_channels(); -struct xrdp_api_data *APP_CC struct_from_dvc_chan_id(tui32 dvc_chan_id); +struct xrdp_api_data * APP_CC struct_from_dvc_chan_id(tui32 dvc_chan_id); int remove_struct_with_chan_id(tui32 dvc_chan_id); #define LOG_LEVEL 5 diff --git a/sesman/chansrv/clipboard.h b/sesman/chansrv/clipboard.h index 74919170..449899ba 100644 --- a/sesman/chansrv/clipboard.h +++ b/sesman/chansrv/clipboard.h @@ -1,8 +1,8 @@ /** * xrdp: A Remote Desktop Protocol server. * - * Copyright (C) Jay Sorg 2009-2012 - * Copyright (C) Laxmikant Rashinkar 2012 + * Copyright (C) Jay Sorg 2009-2013 + * Copyright (C) Laxmikant Rashinkar 2012-2013 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,14 +23,9 @@ #include "arch.h" #include "parse.h" -int APP_CC -clipboard_init(void); -int APP_CC -clipboard_deinit(void); -int APP_CC -clipboard_data_in(struct stream* s, int chan_id, int chan_flags, int length, - int total_length); -int APP_CC -clipboard_xevent(void* xevent); +int APP_CC clipboard_init(void); +int APP_CC clipboard_deinit(void); +int APP_CC clipboard_data_in(struct stream *s, int chan_id, int chan_flags, int length, int total_length); +int APP_CC clipboard_xevent(void *xevent); #endif diff --git a/sesman/chansrv/clipboard_common.h b/sesman/chansrv/clipboard_common.h index b1d5d723..5a74de66 100644 --- a/sesman/chansrv/clipboard_common.h +++ b/sesman/chansrv/clipboard_common.h @@ -1,7 +1,7 @@ /** * xrdp: A Remote Desktop Protocol server. * - * Copyright (C) Jay Sorg 2012 + * Copyright (C) Jay Sorg 2012-2013 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -127,9 +127,7 @@ struct clip_file_desc /* CLIPRDR_FILEDESCRIPTOR */ char cFileName[256]; }; -int APP_CC -clipboard_out_unicode(struct stream *s, char *text, int num_chars); -int APP_CC -clipboard_in_unicode(struct stream *s, char *text, int *num_chars); +int APP_CC clipboard_out_unicode(struct stream *s, char *text, int num_chars); +int APP_CC clipboard_in_unicode(struct stream *s, char *text, int *num_chars); #endif diff --git a/sesman/chansrv/devredir.c b/sesman/chansrv/devredir.c index 8de28e43..f254fa89 100644 --- a/sesman/chansrv/devredir.c +++ b/sesman/chansrv/devredir.c @@ -515,7 +515,9 @@ void dev_redir_send_drive_dir_request(IRP *irp, tui32 device_id, if (InitialQuery) { if (Path == NULL) + { return; + } /* Path in unicode needs this much space */ path_len = ((g_mbstowcs(NULL, Path, 0) * sizeof(twchar)) / 2) + 2; @@ -704,7 +706,8 @@ void devredir_proc_client_devlist_announce_req(struct stream *s) } } -void dev_redir_proc_device_iocompletion(struct stream *s) +void APP_CC +dev_redir_proc_device_iocompletion(struct stream *s) { FUSE_DATA *fuse_data = NULL; IRP *irp = NULL; @@ -859,11 +862,12 @@ done: log_debug("exiting"); } -void dev_redir_proc_query_dir_response(IRP *irp, - struct stream *s_in, - tui32 DeviceId, - tui32 CompletionId, - tui32 IoStatus) +void APP_CC +dev_redir_proc_query_dir_response(IRP *irp, + struct stream *s_in, + tui32 DeviceId, + tui32 CompletionId, + tui32 IoStatus) { FUSE_DATA *fuse_data = NULL; XRDP_INODE *xinode = NULL; @@ -984,7 +988,8 @@ void dev_redir_proc_query_dir_response(IRP *irp, * @return 0 on success, -1 on failure *****************************************************************************/ -int dev_redir_get_dir_listing(void *fusep, tui32 device_id, char *path) +int APP_CC +dev_redir_get_dir_listing(void *fusep, tui32 device_id, char *path) { tui32 DesiredAccess; tui32 CreateOptions; @@ -1028,8 +1033,9 @@ int dev_redir_get_dir_listing(void *fusep, tui32 device_id, char *path) return rval; } -int dev_redir_file_open(void *fusep, tui32 device_id, char *path, - int mode, int type, char *gen_buf) +int APP_CC +dev_redir_file_open(void *fusep, tui32 device_id, char *path, + int mode, int type, char *gen_buf) { tui32 DesiredAccess; tui32 CreateOptions; @@ -1140,7 +1146,8 @@ int devredir_file_close(void *fusep, tui32 device_id, tui32 FileId) * Remove (delete) a directory or file *****************************************************************************/ -int devredir_rmdir_or_file(void *fusep, tui32 device_id, char *path, int mode) +int APP_CC +devredir_rmdir_or_file(void *fusep, tui32 device_id, char *path, int mode) { tui32 DesiredAccess; tui32 CreateOptions; @@ -1181,8 +1188,9 @@ int devredir_rmdir_or_file(void *fusep, tui32 device_id, char *path, int mode) * @return 0 on success, -1 on failure *****************************************************************************/ -int devredir_file_read(void *fusep, tui32 DeviceId, tui32 FileId, - tui32 Length, tui64 Offset) +int APP_CC +devredir_file_read(void *fusep, tui32 DeviceId, tui32 FileId, + tui32 Length, tui64 Offset) { struct stream *s; IRP *irp; @@ -1229,8 +1237,9 @@ int devredir_file_read(void *fusep, tui32 DeviceId, tui32 FileId, return 0; } -int dev_redir_file_write(void *fusep, tui32 DeviceId, tui32 FileId, - const char *buf, tui32 Length, tui64 Offset) +int APP_CC +dev_redir_file_write(void *fusep, tui32 DeviceId, tui32 FileId, + const char *buf, tui32 Length, tui64 Offset) { struct stream *s; IRP *irp; @@ -1293,7 +1302,8 @@ int dev_redir_file_write(void *fusep, tui32 DeviceId, tui32 FileId, * @return FUSE_DATA on success, or NULL on failure *****************************************************************************/ -void *devredir_fuse_data_peek(IRP *irp) +void * APP_CC +devredir_fuse_data_peek(IRP *irp) { log_debug("returning %p", irp->fd_head); return irp->fd_head; @@ -1305,7 +1315,8 @@ void *devredir_fuse_data_peek(IRP *irp) * @return FUSE_DATA on success, NULL on failure *****************************************************************************/ -void *devredir_fuse_data_dequeue(IRP *irp) +void * APP_CC +devredir_fuse_data_dequeue(IRP *irp) { FUSE_DATA *head; @@ -1340,7 +1351,8 @@ void *devredir_fuse_data_dequeue(IRP *irp) * @return 0 on success, -1 on failure *****************************************************************************/ -int devredir_fuse_data_enqueue(IRP *irp, void *vp) +int APP_CC +devredir_fuse_data_enqueue(IRP *irp, void *vp) { FUSE_DATA *fd; FUSE_DATA *tail; @@ -1377,12 +1389,13 @@ int devredir_fuse_data_enqueue(IRP *irp, void *vp) ** miscellaneous stuff ** ******************************************************************************/ -void devredir_insert_DeviceIoRequest(struct stream *s, - tui32 DeviceId, - tui32 FileId, - tui32 CompletionId, - tui32 MajorFunction, - tui32 MinorFunction) +void APP_CC +devredir_insert_DeviceIoRequest(struct stream *s, + tui32 DeviceId, + tui32 FileId, + tui32 CompletionId, + tui32 MajorFunction, + tui32 MinorFunction) { /* setup DR_DEVICE_IOREQUEST header */ xstream_wr_u16_le(s, RDPDR_CTYP_CORE); @@ -1398,7 +1411,8 @@ void devredir_insert_DeviceIoRequest(struct stream *s, * Convert / to windows compatible \ *****************************************************************************/ -void devredir_cvt_slash(char *path) +void APP_CC +devredir_cvt_slash(char *path) { char *cptr = path; @@ -1410,7 +1424,8 @@ void devredir_cvt_slash(char *path) } } -void devredir_cvt_to_unicode(char *unicode, char *path) +void APP_CC +devredir_cvt_to_unicode(char *unicode, char *path) { char *dest; char *src; @@ -1435,7 +1450,8 @@ void devredir_cvt_to_unicode(char *unicode, char *path) *dest++ = 0; } -void devredir_cvt_from_unicode_len(char *path, char *unicode, int len) +void APP_CC +devredir_cvt_from_unicode_len(char *path, char *unicode, int len) { char *dest; char *dest_saved; @@ -1472,7 +1488,8 @@ void devredir_cvt_from_unicode_len(char *path, char *unicode, int len) g_free(dest_saved); } -int dev_redir_string_ends_with(char *string, char c) +int APP_CC +dev_redir_string_ends_with(char *string, char c) { int len; @@ -1480,14 +1497,16 @@ int dev_redir_string_ends_with(char *string, char c) return (string[len - 1] == c) ? 1 : 0; } -void devredir_insert_RDPDR_header(struct stream *s, tui16 Component, - tui16 PacketId) +void APP_CC +devredir_insert_RDPDR_header(struct stream *s, tui16 Component, + tui16 PacketId) { xstream_wr_u16_le(s, Component); xstream_wr_u16_le(s, PacketId); } -void devredir_proc_cid_rmdir_or_file(IRP *irp, tui32 IoStatus) +void APP_CC +devredir_proc_cid_rmdir_or_file(IRP *irp, tui32 IoStatus) { struct stream *s; int bytes; @@ -1523,7 +1542,8 @@ void devredir_proc_cid_rmdir_or_file(IRP *irp, tui32 IoStatus) return; } -void devredir_proc_cid_rmdir_or_file_resp(IRP *irp, tui32 IoStatus) +void APP_CC +devredir_proc_cid_rmdir_or_file_resp(IRP *irp, tui32 IoStatus) { FUSE_DATA *fuse_data; @@ -1549,7 +1569,8 @@ void devredir_proc_cid_rmdir_or_file_resp(IRP *irp, tui32 IoStatus) IRP_MJ_CLOSE, 0, 32); } -void devredir_proc_cid_rename_file(IRP *irp, tui32 IoStatus) +void APP_CC +devredir_proc_cid_rename_file(IRP *irp, tui32 IoStatus) { struct stream *s; int bytes; @@ -1601,7 +1622,8 @@ void devredir_proc_cid_rename_file(IRP *irp, tui32 IoStatus) return; } -void devredir_proc_cid_rename_file_resp(IRP *irp, tui32 IoStatus) +void APP_CC +devredir_proc_cid_rename_file_resp(IRP *irp, tui32 IoStatus) { FUSE_DATA *fuse_data; diff --git a/sesman/chansrv/drdynvc.c b/sesman/chansrv/drdynvc.c index af86ea57..eaad17cc 100644 --- a/sesman/chansrv/drdynvc.c +++ b/sesman/chansrv/drdynvc.c @@ -22,12 +22,9 @@ 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_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); diff --git a/sesman/chansrv/irp.h b/sesman/chansrv/irp.h index 64cbac93..e1a65d83 100644 --- a/sesman/chansrv/irp.h +++ b/sesman/chansrv/irp.h @@ -54,12 +54,12 @@ struct irp tui32 CompletionId, tui32 IoStatus); }; -IRP * devredir_irp_new(); -IRP * devredir_irp_clone(IRP *irp); -int devredir_irp_delete(IRP *irp); -IRP * devredir_irp_find(tui32 completion_id); -IRP * devredir_irp_find_by_fileid(tui32 FileId); -IRP * devredir_irp_get_last(); -void devredir_irp_dump(); +IRP * APP_CC devredir_irp_new(void); +IRP * APP_CC devredir_irp_clone(IRP *irp); +int APP_CC devredir_irp_delete(IRP *irp); +IRP * APP_CC devredir_irp_find(tui32 completion_id); +IRP * APP_CC devredir_irp_find_by_fileid(tui32 FileId); +IRP * APP_CC devredir_irp_get_last(void); +void APP_CC devredir_irp_dump(void); #endif /* end ifndef __IRP_H */ diff --git a/sesman/chansrv/smartcard.c b/sesman/chansrv/smartcard.c index 19650be1..d1052b9c 100644 --- a/sesman/chansrv/smartcard.c +++ b/sesman/chansrv/smartcard.c @@ -147,7 +147,8 @@ static void scard_release_resources(void); ** non static functions ** ******************************************************************************/ -void scard_device_announce(tui32 device_id) +void APP_CC +scard_device_announce(tui32 device_id) { IRP *irp; @@ -187,9 +188,10 @@ void scard_device_announce(tui32 device_id) ** callbacks into this module ** ******************************************************************************/ -void scard_handle_EstablishContext_Return(struct stream *s, IRP *irp, - tui32 DeviceId, tui32 CompletionId, - tui32 IoStatus) +void APP_CC +scard_handle_EstablishContext_Return(struct stream *s, IRP *irp, + tui32 DeviceId, tui32 CompletionId, + tui32 IoStatus) { tui32 len; int tmp; @@ -243,9 +245,10 @@ void scard_handle_EstablishContext_Return(struct stream *s, IRP *irp, log_debug("leaving"); } -void scard_handle_ListReaders_Return(struct stream *s, IRP *irp, - tui32 DeviceId, tui32 CompletionId, - tui32 IoStatus) +void APP_CC +scard_handle_ListReaders_Return(struct stream *s, IRP *irp, + tui32 DeviceId, tui32 CompletionId, + tui32 IoStatus) { tui32 len; @@ -283,7 +286,8 @@ void scard_handle_ListReaders_Return(struct stream *s, IRP *irp, * *****************************************************************************/ -static void scard_send_EstablishContext(IRP *irp) +static void APP_CC +scard_send_EstablishContext(IRP *irp) { struct stream *s; int bytes; @@ -311,7 +315,8 @@ static void scard_send_EstablishContext(IRP *irp) * *****************************************************************************/ -static void scard_send_ListReaders(IRP *irp, int wide) +static void APP_CC +scard_send_ListReaders(IRP *irp, int wide) { /* see [MS-RDPESC] 2.2.2.4 */ @@ -405,7 +410,8 @@ static void scard_send_ListReaders(IRP *irp, int wide) * @return stream with IOCTL inserted in it, NULL on error *****************************************************************************/ -static struct stream *scard_make_new_ioctl(IRP *irp, tui32 ioctl) +static struct stream * APP_CC +scard_make_new_ioctl(IRP *irp, tui32 ioctl) { /* * format of device control request @@ -462,7 +468,8 @@ static struct stream *scard_make_new_ioctl(IRP *irp, tui32 ioctl) * @return index into smartcards[] on success, -1 on failure *****************************************************************************/ -static int scard_add_new_device(tui32 device_id) +static int APP_CC +scard_add_new_device(tui32 device_id) { int index; SMARTCARD *sc; @@ -485,10 +492,12 @@ static int scard_add_new_device(tui32 device_id) /** * Find first unused entry in smartcards * - * @return index of first unused entry in smartcards or -1 if smartcards is full + * @return index of first unused entry in smartcards or -1 if smartcards + * is full *****************************************************************************/ -static int scard_get_free_slot(void) +static int APP_CC +scard_get_free_slot(void) { int i; @@ -509,7 +518,8 @@ static int scard_get_free_slot(void) * Release resources prior to shutting down *****************************************************************************/ -static void scard_release_resources(void) +static void APP_CC +scard_release_resources(void) { int i; |