Eliminate APP_CC and DEFAULT_CC

This commit is contained in:
Pavel Roskin 2017-03-12 09:35:00 -07:00 committed by jsorg71
parent 8be83473b7
commit 6ed4c969f4
122 changed files with 2034 additions and 2047 deletions

View File

@ -96,14 +96,6 @@ typedef int bool_t;
#define THREAD_CC
#endif
#if defined(__BORLANDC__) || defined(_WIN32)
#define APP_CC __fastcall
#define DEFAULT_CC __cdecl
#else
#define APP_CC
#define DEFAULT_CC
#endif
#if defined(_WIN32)
#if defined(__BORLANDC__)
#define EXPORT_CC _export __cdecl

View File

@ -31,7 +31,7 @@
* @return pointer to new FIFO or NULL if system out of memory
*****************************************************************************/
FIFO * APP_CC
FIFO *
fifo_create(void)
{
return (FIFO *) g_malloc(sizeof(FIFO), 1);
@ -41,7 +41,7 @@ fifo_create(void)
* Delete specified FIFO
*****************************************************************************/
void APP_CC
void
fifo_delete(FIFO *self)
{
USER_DATA *udp;
@ -91,7 +91,7 @@ fifo_delete(FIFO *self)
* @return 0 on success, -1 on error
*****************************************************************************/
int APP_CC
int
fifo_add_item(FIFO *self, void *item)
{
USER_DATA *udp;
@ -128,7 +128,7 @@ fifo_add_item(FIFO *self, void *item)
* @return top item from FIFO or NULL if FIFO is empty
*****************************************************************************/
void * APP_CC
void *
fifo_remove_item(FIFO *self)
{
void *item;
@ -163,7 +163,7 @@ fifo_remove_item(FIFO *self)
* @return true if FIFO is empty, false otherwise
*****************************************************************************/
int APP_CC
int
fifo_is_empty(FIFO *self)
{
if (!self)

View File

@ -38,10 +38,10 @@ typedef struct fifo
int auto_free;
} FIFO;
FIFO * APP_CC fifo_create(void);
void APP_CC fifo_delete(FIFO *self);
int APP_CC fifo_add_item(FIFO *self, void *item);
void * APP_CC fifo_remove_item(FIFO *self);
int APP_CC fifo_is_empty(FIFO *self);
FIFO * fifo_create(void);
void fifo_delete(FIFO *self);
int fifo_add_item(FIFO *self, void *item);
void * fifo_remove_item(FIFO *self);
int fifo_is_empty(FIFO *self);
#endif

View File

@ -30,14 +30,14 @@
#define FILE_MAX_LINE_BYTES 2048
static int APP_CC
static int
file_read_ini_line(struct stream *s, char *text, int text_bytes);
/*****************************************************************************/
/* look up for a section name within str (i.e. pattern [section_name])
* if a section name is found, this function return 1 and copy the section
* inplace of str. */
static int APP_CC
static int
line_lookup_for_section_name(char *str, int str_bytes)
{
int name_index_start;
@ -76,7 +76,7 @@ line_lookup_for_section_name(char *str, int str_bytes)
/* returns error
returns 0 if everything is ok
returns 1 if problem reading file */
static int APP_CC
static int
l_file_read_sections(int fd, int max_file_size, struct list *names)
{
struct stream *s;
@ -117,7 +117,7 @@ l_file_read_sections(int fd, int max_file_size, struct list *names)
* returns error
* returns 0 if everything is ok
* returns 1 if problem reading file */
static int APP_CC
static int
file_read_ini_line(struct stream *s, char *text, int text_bytes)
{
int i;
@ -195,7 +195,7 @@ file_read_ini_line(struct stream *s, char *text, int text_bytes)
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
file_split_name_value(char *text, char *name, char *value)
{
int len;
@ -238,7 +238,7 @@ file_split_name_value(char *text, char *name, char *value)
/*****************************************************************************/
/* return error */
static int APP_CC
static int
l_file_read_section(int fd, int max_file_size, const char *section,
struct list *names, struct list *values)
{
@ -324,7 +324,7 @@ l_file_read_section(int fd, int max_file_size, const char *section,
returns 0 if everything is ok
returns 1 if problem reading file */
/* 32 K file size limit */
int APP_CC
int
file_read_sections(int fd, struct list *names)
{
return l_file_read_sections(fd, 32 * 1024, names);
@ -334,7 +334,7 @@ file_read_sections(int fd, struct list *names)
/* return error */
/* this function should be preferred over file_read_sections because it can
read any file size */
int APP_CC
int
file_by_name_read_sections(const char *file_name, struct list *names)
{
int fd;
@ -363,7 +363,7 @@ file_by_name_read_sections(const char *file_name, struct list *names)
/*****************************************************************************/
/* return error */
/* 32 K file size limit */
int APP_CC
int
file_read_section(int fd, const char *section,
struct list *names, struct list *values)
{
@ -374,7 +374,7 @@ file_read_section(int fd, const char *section,
/* return error */
/* this function should be preferred over file_read_section because it can
read any file size */
int APP_CC
int
file_by_name_read_section(const char *file_name, const char *section,
struct list *names, struct list *values)
{

View File

@ -23,14 +23,14 @@
#include "arch.h"
int APP_CC
int
file_read_sections(int fd, struct list* names);
int APP_CC
int
file_by_name_read_sections(const char* file_name, struct list* names);
int APP_CC
int
file_read_section(int fd, const char* section,
struct list* names, struct list* values);
int APP_CC
int
file_by_name_read_section(const char* file_name, const char* section,
struct list* names, struct list* values);

View File

@ -27,7 +27,7 @@
#include "list.h"
/*****************************************************************************/
struct list *APP_CC
struct list *
list_create(void)
{
struct list *self;
@ -40,7 +40,7 @@ list_create(void)
}
/*****************************************************************************/
void APP_CC
void
list_delete(struct list *self)
{
int i;
@ -64,7 +64,7 @@ list_delete(struct list *self)
}
/*****************************************************************************/
void APP_CC
void
list_add_item(struct list *self, tbus item)
{
tbus *p;
@ -85,7 +85,7 @@ list_add_item(struct list *self, tbus item)
}
/*****************************************************************************/
tbus APP_CC
tbus
list_get_item(const struct list *self, int index)
{
if (index < 0 || index >= self->count)
@ -97,7 +97,7 @@ list_get_item(const struct list *self, int index)
}
/*****************************************************************************/
void APP_CC
void
list_clear(struct list *self)
{
int i;
@ -119,7 +119,7 @@ list_clear(struct list *self)
}
/*****************************************************************************/
int APP_CC
int
list_index_of(struct list *self, tbus item)
{
int i;
@ -136,7 +136,7 @@ list_index_of(struct list *self, tbus item)
}
/*****************************************************************************/
void APP_CC
void
list_remove_item(struct list *self, int index)
{
int i;
@ -159,7 +159,7 @@ list_remove_item(struct list *self, int index)
}
/*****************************************************************************/
void APP_CC
void
list_insert_item(struct list *self, int index, tbus item)
{
tbus *p;
@ -197,7 +197,7 @@ list_insert_item(struct list *self, int index, tbus item)
/*****************************************************************************/
/* append one list to another using strdup for each item in the list */
/* begins copy at start_index, a zero based index on the source list */
void APP_CC
void
list_append_list_strdup(struct list *self, struct list *dest, int start_index)
{
int index;
@ -213,7 +213,7 @@ list_append_list_strdup(struct list *self, struct list *dest, int start_index)
}
/*****************************************************************************/
void APP_CC
void
list_dump_items(struct list *self)
{
int index;

View File

@ -33,25 +33,25 @@ struct list
int auto_free;
};
struct list* APP_CC
struct list*
list_create(void);
void APP_CC
void
list_delete(struct list* self);
void APP_CC
void
list_add_item(struct list* self, tintptr item);
tintptr APP_CC
tintptr
list_get_item(const struct list *self, int index);
void APP_CC
void
list_clear(struct list* self);
int APP_CC
int
list_index_of(struct list* self, tintptr item);
void APP_CC
void
list_remove_item(struct list* self, int index);
void APP_CC
void
list_insert_item(struct list* self, int index, tintptr item);
void APP_CC
void
list_append_list_strdup(struct list* self, struct list* dest, int start_index);
void APP_CC
void
list_dump_items(struct list* self);
#endif

View File

@ -27,7 +27,7 @@
#include "list16.h"
/*****************************************************************************/
struct list16 *APP_CC
struct list16 *
list16_create(void)
{
struct list16 *self;
@ -38,7 +38,7 @@ list16_create(void)
}
/*****************************************************************************/
void APP_CC
void
list16_delete(struct list16 *self)
{
if (self == 0)
@ -51,7 +51,7 @@ list16_delete(struct list16 *self)
}
/*****************************************************************************/
void APP_CC
void
list16_init(struct list16* self)
{
g_memset(self, 0, sizeof(struct list16));
@ -60,7 +60,7 @@ list16_init(struct list16* self)
}
/*****************************************************************************/
void APP_CC
void
list16_deinit(struct list16* self)
{
if (self->items != self->mitems)
@ -70,7 +70,7 @@ list16_deinit(struct list16* self)
}
/*****************************************************************************/
void APP_CC
void
list16_add_item(struct list16 *self, tui16 item)
{
tui16 *p;
@ -94,7 +94,7 @@ list16_add_item(struct list16 *self, tui16 item)
}
/*****************************************************************************/
tui16 APP_CC
tui16
list16_get_item(struct list16 *self, int index)
{
if (index < 0 || index >= self->count)
@ -106,7 +106,7 @@ list16_get_item(struct list16 *self, int index)
}
/*****************************************************************************/
void APP_CC
void
list16_clear(struct list16 *self)
{
if (self->items != self->mitems)
@ -119,7 +119,7 @@ list16_clear(struct list16 *self)
}
/*****************************************************************************/
int APP_CC
int
list16_index_of(struct list16 *self, tui16 item)
{
int i;
@ -136,7 +136,7 @@ list16_index_of(struct list16 *self, tui16 item)
}
/*****************************************************************************/
void APP_CC
void
list16_remove_item(struct list16 *self, int index)
{
int i;
@ -153,7 +153,7 @@ list16_remove_item(struct list16 *self, int index)
}
/*****************************************************************************/
void APP_CC
void
list16_insert_item(struct list16 *self, int index, tui16 item)
{
tui16 *p;

View File

@ -32,25 +32,25 @@ struct list16
tui16 mitems[4];
};
struct list16* APP_CC
struct list16*
list16_create(void);
void APP_CC
void
list16_delete(struct list16* self);
void APP_CC
void
list16_init(struct list16* self);
void APP_CC
void
list16_deinit(struct list16* self);
void APP_CC
void
list16_add_item(struct list16* self, tui16 item);
tui16 APP_CC
tui16
list16_get_item(struct list16* self, int index);
void APP_CC
void
list16_clear(struct list16* self);
int APP_CC
int
list16_index_of(struct list16* self, tui16 item);
void APP_CC
void
list16_remove_item(struct list16* self, int index);
void APP_CC
void
list16_insert_item(struct list16* self, int index, tui16 item);
#endif

View File

@ -52,7 +52,7 @@ static struct log_config *g_staticLogConfig = NULL;
* @return see open(2) return values
*
*/
int DEFAULT_CC
int
internal_log_file_open(const char *fname)
{
int ret = -1;
@ -80,7 +80,7 @@ internal_log_file_open(const char *fname)
* @return syslog equivalent logging level
*
*/
int DEFAULT_CC
int
internal_log_xrdp2syslog(const enum logLevels lvl)
{
switch (lvl)
@ -108,7 +108,7 @@ internal_log_xrdp2syslog(const enum logLevels lvl)
* @return The log string in str pointer.
*
*/
void DEFAULT_CC
void
internal_log_lvl2str(const enum logLevels lvl, char *str)
{
switch (lvl)
@ -135,7 +135,7 @@ internal_log_lvl2str(const enum logLevels lvl, char *str)
}
/******************************************************************************/
enum logReturns DEFAULT_CC
enum logReturns
internal_log_start(struct log_config *l_cfg)
{
enum logReturns ret = LOG_GENERAL_ERROR;
@ -183,7 +183,7 @@ internal_log_start(struct log_config *l_cfg)
}
/******************************************************************************/
enum logReturns DEFAULT_CC
enum logReturns
internal_log_end(struct log_config *l_cfg)
{
enum logReturns ret = LOG_GENERAL_ERROR;
@ -225,7 +225,7 @@ internal_log_end(struct log_config *l_cfg)
* @param buf
* @return
*/
enum logLevels DEFAULT_CC
enum logLevels
internal_log_text2level(const char *buf)
{
if (0 == g_strcasecmp(buf, "0") ||
@ -259,7 +259,7 @@ internal_log_text2level(const char *buf)
return LOG_LEVEL_DEBUG;
}
enum logReturns DEFAULT_CC
enum logReturns
internalReadConfiguration(const char *inFilename, const char *applicationName)
{
int fd;
@ -320,7 +320,7 @@ internalReadConfiguration(const char *inFilename, const char *applicationName)
}
/******************************************************************************/
enum logReturns DEFAULT_CC
enum logReturns
internal_config_read_logging(int file, struct log_config *lc,
struct list *param_n,
struct list *param_v,
@ -395,7 +395,7 @@ internal_config_read_logging(int file, struct log_config *lc,
return LOG_STARTUP_OK;
}
enum logReturns DEFAULT_CC
enum logReturns
internalInitAndAllocStruct(void)
{
enum logReturns ret = LOG_GENERAL_ERROR;
@ -420,7 +420,7 @@ internalInitAndAllocStruct(void)
* Here below the public functions
*/
enum logReturns DEFAULT_CC
enum logReturns
log_start_from_param(const struct log_config *iniParams)
{
enum logReturns ret = LOG_GENERAL_ERROR;
@ -479,7 +479,7 @@ log_start_from_param(const struct log_config *iniParams)
* @param applicationName, the name that is used in the log for the running application
* @return 0 on success
*/
enum logReturns DEFAULT_CC
enum logReturns
log_start(const char *iniFile, const char *applicationName)
{
enum logReturns ret = LOG_GENERAL_ERROR;
@ -520,7 +520,7 @@ log_start(const char *iniFile, const char *applicationName)
* Function that terminates all logging
* @return
*/
enum logReturns DEFAULT_CC
enum logReturns
log_end(void)
{
enum logReturns ret = LOG_GENERAL_ERROR;
@ -535,7 +535,7 @@ log_end(void)
return ret;
}
enum logReturns DEFAULT_CC
enum logReturns
log_message(const enum logLevels lvl, const char *msg, ...)
{
char buff[LOG_BUFFER_SIZE + 31]; /* 19 (datetime) 4 (space+cr+lf+\0) */
@ -631,7 +631,7 @@ log_message(const enum logLevels lvl, const char *msg, ...)
* Return the configured log file name
* @return
*/
char *DEFAULT_CC
char *
getLogFile(char *replybuf, int bufsize)
{
if (g_staticLogConfig)

View File

@ -85,7 +85,7 @@ struct log_config
* @return
*
*/
enum logReturns DEFAULT_CC
enum logReturns
internal_log_start(struct log_config *l_cfg);
/**
@ -94,7 +94,7 @@ internal_log_start(struct log_config *l_cfg);
* @param l_cfg pointer to the logging subsystem to stop
*
*/
enum logReturns DEFAULT_CC
enum logReturns
internal_log_end(struct log_config *l_cfg);
/**
@ -102,7 +102,7 @@ internal_log_end(struct log_config *l_cfg);
* @param lvl, the loglevel
* @param str pointer where the string will be stored.
*/
void DEFAULT_CC
void
internal_log_lvl2str(const enum logLevels lvl, char *str);
/**
@ -112,7 +112,7 @@ internal_log_lvl2str(const enum logLevels lvl, char *str);
* @return The corresponding level or LOG_LEVEL_DEBUG if error
*
*/
enum logLevels DEFAULT_CC
enum logLevels
internal_log_text2level(const char *s);
/**
@ -120,7 +120,7 @@ internal_log_text2level(const char *s);
* also init its content.
* @return LOG_STARTUP_OK or LOG_ERROR_MALLOC
*/
enum logReturns DEFAULT_CC
enum logReturns
internalInitAndAllocStruct(void);
/**
@ -132,7 +132,7 @@ internalInitAndAllocStruct(void);
* @param applicationName, the application name used in the log events.
* @return
*/
enum logReturns DEFAULT_CC
enum logReturns
internal_config_read_logging(int file, struct log_config *lc,
struct list *param_n,
struct list *param_v,
@ -146,7 +146,7 @@ internal_config_read_logging(int file, struct log_config *lc,
* @param applicationName, the name that is used in the log for the running application
* @return LOG_STARTUP_OK on success
*/
enum logReturns DEFAULT_CC
enum logReturns
log_start(const char *iniFile, const char *applicationName);
/**
@ -154,13 +154,13 @@ log_start(const char *iniFile, const char *applicationName);
* @param iniParams
* @return
*/
enum logReturns DEFAULT_CC
enum logReturns
log_start_from_param(const struct log_config *iniParams);
/**
* Function that terminates all logging
* @return
*/
enum logReturns DEFAULT_CC
enum logReturns
log_end(void);
/**
@ -170,7 +170,7 @@ log_end(void);
* @param ...
* @return
*/
enum logReturns DEFAULT_CC
enum logReturns
log_message(const enum logLevels lvl, const char *msg, ...) printflike(2, 3);
/**

File diff suppressed because it is too large Load Diff

View File

@ -37,149 +37,149 @@
#define g_tcp_select g_sck_select
#define g_close_wait_obj g_delete_wait_obj
int APP_CC g_rm_temp_dir(void);
int APP_CC g_mk_temp_dir(const char* app_name);
void APP_CC g_init(const char* app_name);
void APP_CC g_deinit(void);
void* APP_CC g_malloc(int size, int zero);
void APP_CC g_free(void* ptr);
void DEFAULT_CC g_printf(const char *format, ...) printflike(1, 2);
void DEFAULT_CC g_sprintf(char* dest, const char* format, ...) \
int g_rm_temp_dir(void);
int g_mk_temp_dir(const char* app_name);
void g_init(const char* app_name);
void g_deinit(void);
void* g_malloc(int size, int zero);
void g_free(void* ptr);
void g_printf(const char *format, ...) printflike(1, 2);
void g_sprintf(char* dest, const char* format, ...) \
printflike(2, 3);
int DEFAULT_CC g_snprintf(char* dest, int len, const char* format, ...) \
int g_snprintf(char* dest, int len, const char* format, ...) \
printflike(3, 4);
void DEFAULT_CC g_writeln(const char* format, ...) printflike(1, 2);
void DEFAULT_CC g_write(const char* format, ...) printflike(1, 2);
void APP_CC g_hexdump(const char *p, int len);
void APP_CC g_memset(void* ptr, int val, int size);
void APP_CC g_memcpy(void* d_ptr, const void* s_ptr, int size);
int APP_CC g_getchar(void);
int APP_CC g_tcp_set_no_delay(int sck);
int APP_CC g_tcp_set_keepalive(int sck);
int APP_CC g_tcp_socket(void);
int APP_CC g_sck_set_send_buffer_bytes(int sck, int bytes);
int APP_CC g_sck_get_send_buffer_bytes(int sck, int *bytes);
int APP_CC g_sck_set_recv_buffer_bytes(int sck, int bytes);
int APP_CC g_sck_get_recv_buffer_bytes(int sck, int *bytes);
int APP_CC g_sck_local_socket(void);
int APP_CC g_sck_get_peer_cred(int sck, int *pid, int *uid, int *gid);
void APP_CC g_sck_close(int sck);
int APP_CC g_tcp_connect(int sck, const char* address, const char* port);
int APP_CC g_sck_local_connect(int sck, const char* port);
int APP_CC g_sck_set_non_blocking(int sck);
int APP_CC g_tcp_bind(int sck, const char *port);
int APP_CC g_sck_local_bind(int sck, const char* port);
int APP_CC g_tcp_bind_address(int sck, const char* port, const char* address);
int APP_CC g_sck_listen(int sck);
int APP_CC g_tcp_accept(int sck);
int APP_CC g_sck_accept(int sck, char *addr, int addr_bytes,
void g_writeln(const char* format, ...) printflike(1, 2);
void g_write(const char* format, ...) printflike(1, 2);
void g_hexdump(const char *p, int len);
void g_memset(void* ptr, int val, int size);
void g_memcpy(void* d_ptr, const void* s_ptr, int size);
int g_getchar(void);
int g_tcp_set_no_delay(int sck);
int g_tcp_set_keepalive(int sck);
int g_tcp_socket(void);
int g_sck_set_send_buffer_bytes(int sck, int bytes);
int g_sck_get_send_buffer_bytes(int sck, int *bytes);
int g_sck_set_recv_buffer_bytes(int sck, int bytes);
int g_sck_get_recv_buffer_bytes(int sck, int *bytes);
int g_sck_local_socket(void);
int g_sck_get_peer_cred(int sck, int *pid, int *uid, int *gid);
void g_sck_close(int sck);
int g_tcp_connect(int sck, const char* address, const char* port);
int g_sck_local_connect(int sck, const char* port);
int g_sck_set_non_blocking(int sck);
int g_tcp_bind(int sck, const char *port);
int g_sck_local_bind(int sck, const char* port);
int g_tcp_bind_address(int sck, const char* port, const char* address);
int g_sck_listen(int sck);
int g_tcp_accept(int sck);
int g_sck_accept(int sck, char *addr, int addr_bytes,
char *port, int port_bytes);
int APP_CC g_sck_recv(int sck, void* ptr, int len, int flags);
int APP_CC g_sck_send(int sck, const void* ptr, int len, int flags);
int APP_CC g_sck_last_error_would_block(int sck);
int APP_CC g_sck_socket_ok(int sck);
int APP_CC g_sck_can_send(int sck, int millis);
int APP_CC g_sck_can_recv(int sck, int millis);
int APP_CC g_sck_select(int sck1, int sck2);
void APP_CC g_write_ip_address(int rcv_sck, char* ip_address, int bytes);
void APP_CC g_sleep(int msecs);
tintptr APP_CC g_create_wait_obj(const char *name);
tintptr APP_CC g_create_wait_obj_from_socket(tintptr socket, int write);
void APP_CC g_delete_wait_obj_from_socket(tintptr wait_obj);
int APP_CC g_set_wait_obj(tintptr obj);
int APP_CC g_reset_wait_obj(tintptr obj);
int APP_CC g_is_wait_obj_set(tintptr obj);
int APP_CC g_delete_wait_obj(tintptr obj);
int APP_CC g_obj_wait(tintptr* read_objs, int rcount, tintptr* write_objs,
int g_sck_recv(int sck, void* ptr, int len, int flags);
int g_sck_send(int sck, const void* ptr, int len, int flags);
int g_sck_last_error_would_block(int sck);
int g_sck_socket_ok(int sck);
int g_sck_can_send(int sck, int millis);
int g_sck_can_recv(int sck, int millis);
int g_sck_select(int sck1, int sck2);
void g_write_ip_address(int rcv_sck, char* ip_address, int bytes);
void g_sleep(int msecs);
tintptr g_create_wait_obj(const char *name);
tintptr g_create_wait_obj_from_socket(tintptr socket, int write);
void g_delete_wait_obj_from_socket(tintptr wait_obj);
int g_set_wait_obj(tintptr obj);
int g_reset_wait_obj(tintptr obj);
int g_is_wait_obj_set(tintptr obj);
int g_delete_wait_obj(tintptr obj);
int g_obj_wait(tintptr* read_objs, int rcount, tintptr* write_objs,
int wcount,int mstimeout);
void APP_CC g_random(char* data, int len);
int APP_CC g_abs(int i);
int APP_CC g_memcmp(const void* s1, const void* s2, int len);
int APP_CC g_file_open(const char* file_name);
int APP_CC g_file_open_ex(const char *file_name, int aread, int awrite,
void g_random(char* data, int len);
int g_abs(int i);
int g_memcmp(const void* s1, const void* s2, int len);
int g_file_open(const char* file_name);
int g_file_open_ex(const char *file_name, int aread, int awrite,
int acreate, int atrunc);
int APP_CC g_file_close(int fd);
int APP_CC g_file_read(int fd, char* ptr, int len);
int APP_CC g_file_write(int fd, const char *ptr, int len);
int APP_CC g_file_seek(int fd, int offset);
int APP_CC g_file_lock(int fd, int start, int len);
int APP_CC g_chmod_hex(const char* filename, int flags);
int APP_CC g_chown(const char* name, int uid, int gid);
int APP_CC g_mkdir(const char* dirname);
char* APP_CC g_get_current_dir(char* dirname, int maxlen);
int APP_CC g_set_current_dir(const char *dirname);
int APP_CC g_file_exist(const char* filename);
int APP_CC g_directory_exist(const char* dirname);
int APP_CC g_create_dir(const char* dirname);
int APP_CC g_create_path(const char* path);
int APP_CC g_remove_dir(const char* dirname);
int APP_CC g_file_delete(const char* filename);
int APP_CC g_file_get_size(const char* filename);
int APP_CC g_strlen(const char* text);
const char *APP_CC g_strchr(const char *text, int c);
char* APP_CC g_strcpy(char* dest, const char* src);
char* APP_CC g_strncpy(char* dest, const char* src, int len);
char* APP_CC g_strcat(char* dest, const char* src);
char* APP_CC g_strdup(const char* in);
char* APP_CC g_strndup(const char* in, const unsigned int maxlen);
int APP_CC g_strcmp(const char* c1, const char* c2);
int APP_CC g_strncmp(const char* c1, const char* c2, int len);
int APP_CC g_strncmp_d(const char* c1, const char* c2, const char delim, int len);
int APP_CC g_strcasecmp(const char* c1, const char* c2);
int APP_CC g_strncasecmp(const char* c1, const char* c2, int len);
int APP_CC g_atoi(const char* str);
int APP_CC g_htoi(char* str);
int APP_CC g_bytes_to_hexstr(const void *bytes, int num_bytes, char *out_str,
int g_file_close(int fd);
int g_file_read(int fd, char* ptr, int len);
int g_file_write(int fd, const char *ptr, int len);
int g_file_seek(int fd, int offset);
int g_file_lock(int fd, int start, int len);
int g_chmod_hex(const char* filename, int flags);
int g_chown(const char* name, int uid, int gid);
int g_mkdir(const char* dirname);
char* g_get_current_dir(char* dirname, int maxlen);
int g_set_current_dir(const char *dirname);
int g_file_exist(const char* filename);
int g_directory_exist(const char* dirname);
int g_create_dir(const char* dirname);
int g_create_path(const char* path);
int g_remove_dir(const char* dirname);
int g_file_delete(const char* filename);
int g_file_get_size(const char* filename);
int g_strlen(const char* text);
const char *g_strchr(const char *text, int c);
char* g_strcpy(char* dest, const char* src);
char* g_strncpy(char* dest, const char* src, int len);
char* g_strcat(char* dest, const char* src);
char* g_strdup(const char* in);
char* g_strndup(const char* in, const unsigned int maxlen);
int g_strcmp(const char* c1, const char* c2);
int g_strncmp(const char* c1, const char* c2, int len);
int g_strncmp_d(const char* c1, const char* c2, const char delim, int len);
int g_strcasecmp(const char* c1, const char* c2);
int g_strncasecmp(const char* c1, const char* c2, int len);
int g_atoi(const char* str);
int g_htoi(char* str);
int g_bytes_to_hexstr(const void *bytes, int num_bytes, char *out_str,
int bytes_out_str);
int APP_CC g_pos(const char* str, const char* to_find);
int APP_CC g_mbstowcs(twchar* dest, const char* src, int n);
int APP_CC g_wcstombs(char* dest, const twchar* src, int n);
int APP_CC g_strtrim(char* str, int trim_flags);
long APP_CC g_load_library(char* in);
int APP_CC g_free_library(long lib);
void* APP_CC g_get_proc_address(long lib, const char* name);
int APP_CC g_system(char* aexec);
char* APP_CC g_get_strerror(void);
int APP_CC g_get_errno(void);
int APP_CC g_execvp(const char* p1, char* args[]);
int APP_CC g_execlp3(const char* a1, const char* a2, const char* a3);
void APP_CC g_signal_child_stop(void (*func)(int));
void APP_CC g_signal_segfault(void (*func)(int));
void APP_CC g_signal_hang_up(void (*func)(int));
void APP_CC g_signal_user_interrupt(void (*func)(int));
void APP_CC g_signal_terminate(void (*func)(int));
void APP_CC g_signal_pipe(void (*func)(int));
void APP_CC g_signal_usr1(void (*func)(int));
int APP_CC g_fork(void);
int APP_CC g_setgid(int pid);
int APP_CC g_initgroups(const char* user, int gid);
int APP_CC g_getuid(void);
int APP_CC g_getgid(void);
int APP_CC g_setuid(int pid);
int APP_CC g_setsid(void);
int APP_CC g_setlogin(const char *name);
int APP_CC g_waitchild(void);
int APP_CC g_waitpid(int pid);
void APP_CC g_clearenv(void);
int APP_CC g_setenv(const char* name, const char* value, int rewrite);
char* APP_CC g_getenv(const char* name);
int APP_CC g_exit(int exit_code);
int APP_CC g_getpid(void);
int APP_CC g_sigterm(int pid);
int APP_CC g_getuser_info(const char* username, int* gid, int* uid, char** shell,
int g_pos(const char* str, const char* to_find);
int g_mbstowcs(twchar* dest, const char* src, int n);
int g_wcstombs(char* dest, const twchar* src, int n);
int g_strtrim(char* str, int trim_flags);
long g_load_library(char* in);
int g_free_library(long lib);
void* g_get_proc_address(long lib, const char* name);
int g_system(char* aexec);
char* g_get_strerror(void);
int g_get_errno(void);
int g_execvp(const char* p1, char* args[]);
int g_execlp3(const char* a1, const char* a2, const char* a3);
void g_signal_child_stop(void (*func)(int));
void g_signal_segfault(void (*func)(int));
void g_signal_hang_up(void (*func)(int));
void g_signal_user_interrupt(void (*func)(int));
void g_signal_terminate(void (*func)(int));
void g_signal_pipe(void (*func)(int));
void g_signal_usr1(void (*func)(int));
int g_fork(void);
int g_setgid(int pid);
int g_initgroups(const char* user, int gid);
int g_getuid(void);
int g_getgid(void);
int g_setuid(int pid);
int g_setsid(void);
int g_setlogin(const char *name);
int g_waitchild(void);
int g_waitpid(int pid);
void g_clearenv(void);
int g_setenv(const char* name, const char* value, int rewrite);
char* g_getenv(const char* name);
int g_exit(int exit_code);
int g_getpid(void);
int g_sigterm(int pid);
int g_getuser_info(const char* username, int* gid, int* uid, char** shell,
char** dir, char** gecos);
int APP_CC g_getgroup_info(const char* groupname, int* gid);
int APP_CC g_check_user_in_group(const char* username, int gid, int* ok);
int APP_CC g_time1(void);
int APP_CC g_time2(void);
int APP_CC g_time3(void);
int APP_CC g_save_to_bmp(const char* filename, char* data, int stride_bytes,
int g_getgroup_info(const char* groupname, int* gid);
int g_check_user_in_group(const char* username, int gid, int* ok);
int g_time1(void);
int g_time2(void);
int g_time3(void);
int g_save_to_bmp(const char* filename, char* data, int stride_bytes,
int width, int height, int depth, int bits_per_pixel);
int APP_CC g_text2bool(const char *s);
void * APP_CC g_shmat(int shmid);
int APP_CC g_shmdt(const void *shmaddr);
int APP_CC g_gethostname(char *name, int len);
int APP_CC g_mirror_memcpy(void *dst, const void *src, int len);
int g_text2bool(const char *s);
void * g_shmat(int shmid);
int g_shmdt(const void *shmaddr);
int g_gethostname(char *name, int len);
int g_mirror_memcpy(void *dst, const void *src, int len);
/* glib-style wrappers */
#define g_new(struct_type, n_structs) \

View File

@ -85,28 +85,28 @@ ssl_finish(void)
/* rc4 stuff */
/*****************************************************************************/
void *APP_CC
void *
ssl_rc4_info_create(void)
{
return g_malloc(sizeof(RC4_KEY), 1);
}
/*****************************************************************************/
void APP_CC
void
ssl_rc4_info_delete(void *rc4_info)
{
g_free(rc4_info);
}
/*****************************************************************************/
void APP_CC
void
ssl_rc4_set_key(void *rc4_info, char *key, int len)
{
RC4_set_key((RC4_KEY *)rc4_info, len, (tui8 *)key);
}
/*****************************************************************************/
void APP_CC
void
ssl_rc4_crypt(void *rc4_info, char *data, int len)
{
RC4((RC4_KEY *)rc4_info, len, (tui8 *)data, (tui8 *)data);
@ -115,35 +115,35 @@ ssl_rc4_crypt(void *rc4_info, char *data, int len)
/* sha1 stuff */
/*****************************************************************************/
void *APP_CC
void *
ssl_sha1_info_create(void)
{
return g_malloc(sizeof(SHA_CTX), 1);
}
/*****************************************************************************/
void APP_CC
void
ssl_sha1_info_delete(void *sha1_info)
{
g_free(sha1_info);
}
/*****************************************************************************/
void APP_CC
void
ssl_sha1_clear(void *sha1_info)
{
SHA1_Init((SHA_CTX *)sha1_info);
}
/*****************************************************************************/
void APP_CC
void
ssl_sha1_transform(void *sha1_info, const char *data, int len)
{
SHA1_Update((SHA_CTX *)sha1_info, data, len);
}
/*****************************************************************************/
void APP_CC
void
ssl_sha1_complete(void *sha1_info, char *data)
{
SHA1_Final((tui8 *)data, (SHA_CTX *)sha1_info);
@ -152,35 +152,35 @@ ssl_sha1_complete(void *sha1_info, char *data)
/* md5 stuff */
/*****************************************************************************/
void *APP_CC
void *
ssl_md5_info_create(void)
{
return g_malloc(sizeof(MD5_CTX), 1);
}
/*****************************************************************************/
void APP_CC
void
ssl_md5_info_delete(void *md5_info)
{
g_free(md5_info);
}
/*****************************************************************************/
void APP_CC
void
ssl_md5_clear(void *md5_info)
{
MD5_Init((MD5_CTX *)md5_info);
}
/*****************************************************************************/
void APP_CC
void
ssl_md5_transform(void *md5_info, char *data, int len)
{
MD5_Update((MD5_CTX *)md5_info, data, len);
}
/*****************************************************************************/
void APP_CC
void
ssl_md5_complete(void *md5_info, char *data)
{
MD5_Final((tui8 *)data, (MD5_CTX *)md5_info);
@ -189,7 +189,7 @@ ssl_md5_complete(void *md5_info, char *data)
/* FIPS stuff */
/*****************************************************************************/
void *APP_CC
void *
ssl_des3_encrypt_info_create(const char *key, const char* ivec)
{
EVP_CIPHER_CTX *des3_ctx;
@ -205,7 +205,7 @@ ssl_des3_encrypt_info_create(const char *key, const char* ivec)
}
/*****************************************************************************/
void *APP_CC
void *
ssl_des3_decrypt_info_create(const char *key, const char* ivec)
{
EVP_CIPHER_CTX *des3_ctx;
@ -221,7 +221,7 @@ ssl_des3_decrypt_info_create(const char *key, const char* ivec)
}
/*****************************************************************************/
void APP_CC
void
ssl_des3_info_delete(void *des3)
{
EVP_CIPHER_CTX *des3_ctx;
@ -234,7 +234,7 @@ ssl_des3_info_delete(void *des3)
}
/*****************************************************************************/
int APP_CC
int
ssl_des3_encrypt(void *des3, int length, const char *in_data, char *out_data)
{
EVP_CIPHER_CTX *des3_ctx;
@ -251,7 +251,7 @@ ssl_des3_encrypt(void *des3, int length, const char *in_data, char *out_data)
}
/*****************************************************************************/
int APP_CC
int
ssl_des3_decrypt(void *des3, int length, const char *in_data, char *out_data)
{
EVP_CIPHER_CTX *des3_ctx;
@ -268,7 +268,7 @@ ssl_des3_decrypt(void *des3, int length, const char *in_data, char *out_data)
}
/*****************************************************************************/
void * APP_CC
void *
ssl_hmac_info_create(void)
{
HMAC_CTX *hmac_ctx;
@ -278,7 +278,7 @@ ssl_hmac_info_create(void)
}
/*****************************************************************************/
void APP_CC
void
ssl_hmac_info_delete(void *hmac)
{
HMAC_CTX *hmac_ctx;
@ -291,7 +291,7 @@ ssl_hmac_info_delete(void *hmac)
}
/*****************************************************************************/
void APP_CC
void
ssl_hmac_sha1_init(void *hmac, const char *data, int len)
{
HMAC_CTX *hmac_ctx;
@ -301,7 +301,7 @@ ssl_hmac_sha1_init(void *hmac, const char *data, int len)
}
/*****************************************************************************/
void APP_CC
void
ssl_hmac_transform(void *hmac, const char *data, int len)
{
HMAC_CTX *hmac_ctx;
@ -313,7 +313,7 @@ ssl_hmac_transform(void *hmac, const char *data, int len)
}
/*****************************************************************************/
void APP_CC
void
ssl_hmac_complete(void *hmac, char *data, int len)
{
HMAC_CTX *hmac_ctx;
@ -327,7 +327,7 @@ ssl_hmac_complete(void *hmac, char *data, int len)
}
/*****************************************************************************/
static void APP_CC
static void
ssl_reverse_it(char *p, int len)
{
int i;
@ -348,7 +348,7 @@ ssl_reverse_it(char *p, int len)
}
/*****************************************************************************/
int APP_CC
int
ssl_mod_exp(char *out, int out_len, const char *in, int in_len,
const char *mod, int mod_len, const char *exp, int exp_len)
{
@ -410,7 +410,7 @@ ssl_mod_exp(char *out, int out_len, const char *in, int in_len,
/* returns error
generates a new rsa key
exp is passed in and mod and pri are passed out */
int APP_CC
int
ssl_gen_key_xrdp1(int key_size_in_bits, const char *exp, int exp_len,
char *mod, int mod_len, char *pri, int pri_len)
{
@ -486,7 +486,6 @@ ssl_gen_key_xrdp1(int key_size_in_bits, const char *exp, int exp_len,
/*****************************************************************************/
struct ssl_tls *
APP_CC
ssl_tls_create(struct trans *trans, const char *key, const char *cert)
{
struct ssl_tls *self;
@ -508,7 +507,7 @@ ssl_tls_create(struct trans *trans, const char *key, const char *cert)
}
/*****************************************************************************/
int APP_CC
int
ssl_tls_print_error(const char *func, SSL *connection, int value)
{
switch (SSL_get_error(connection, value))
@ -538,7 +537,7 @@ ssl_tls_print_error(const char *func, SSL *connection, int value)
}
/*****************************************************************************/
int APP_CC
int
ssl_tls_accept(struct ssl_tls *self, long ssl_protocols,
const char *tls_ciphers)
{
@ -665,7 +664,7 @@ ssl_tls_accept(struct ssl_tls *self, long ssl_protocols,
/*****************************************************************************/
/* returns error, */
int APP_CC
int
ssl_tls_disconnect(struct ssl_tls *self)
{
int status;
@ -699,7 +698,7 @@ ssl_tls_disconnect(struct ssl_tls *self)
}
/*****************************************************************************/
void APP_CC
void
ssl_tls_delete(struct ssl_tls *self)
{
if (self != NULL)
@ -717,7 +716,7 @@ ssl_tls_delete(struct ssl_tls *self)
}
/*****************************************************************************/
int APP_CC
int
ssl_tls_read(struct ssl_tls *tls, char *data, int length)
{
int status;
@ -766,7 +765,7 @@ ssl_tls_read(struct ssl_tls *tls, char *data, int length)
}
/*****************************************************************************/
int APP_CC
int
ssl_tls_write(struct ssl_tls *tls, const char *data, int length)
{
int status;
@ -811,7 +810,7 @@ ssl_tls_write(struct ssl_tls *tls, const char *data, int length)
/*****************************************************************************/
/* returns boolean */
int APP_CC
int
ssl_tls_can_recv(struct ssl_tls *tls, int sck, int millis)
{
if (SSL_pending(tls->ssl) > 0)

View File

@ -26,58 +26,58 @@ int
ssl_init(void);
int
ssl_finish(void);
void* APP_CC
void*
ssl_rc4_info_create(void);
void APP_CC
void
ssl_rc4_info_delete(void* rc4_info);
void APP_CC
void
ssl_rc4_set_key(void* rc4_info, char* key, int len);
void APP_CC
void
ssl_rc4_crypt(void* rc4_info, char* data, int len);
void* APP_CC
void*
ssl_sha1_info_create(void);
void APP_CC
void
ssl_sha1_info_delete(void* sha1_info);
void APP_CC
void
ssl_sha1_clear(void* sha1_info);
void APP_CC
void
ssl_sha1_transform(void* sha1_info, const char *data, int len);
void APP_CC
void
ssl_sha1_complete(void* sha1_info, char* data);
void* APP_CC
void*
ssl_md5_info_create(void);
void APP_CC
void
ssl_md5_info_delete(void* md5_info);
void APP_CC
void
ssl_md5_clear(void* md5_info);
void APP_CC
void
ssl_md5_transform(void* md5_info, char* data, int len);
void APP_CC
void
ssl_md5_complete(void* md5_info, char* data);
void *APP_CC
void *
ssl_des3_encrypt_info_create(const char *key, const char* ivec);
void *APP_CC
void *
ssl_des3_decrypt_info_create(const char *key, const char* ivec);
void APP_CC
void
ssl_des3_info_delete(void *des3);
int APP_CC
int
ssl_des3_encrypt(void *des3, int length, const char *in_data, char *out_data);
int APP_CC
int
ssl_des3_decrypt(void *des3, int length, const char *in_data, char *out_data);
void * APP_CC
void *
ssl_hmac_info_create(void);
void APP_CC
void
ssl_hmac_info_delete(void *hmac);
void APP_CC
void
ssl_hmac_sha1_init(void *hmac, const char *data, int len);
void APP_CC
void
ssl_hmac_transform(void *hmac, const char *data, int len);
void APP_CC
void
ssl_hmac_complete(void *hmac, char *data, int len);
int APP_CC
int
ssl_mod_exp(char *out, int out_len, const char *in, int in_len,
const char *mod, int mod_len, const char *exp, int exp_len);
int APP_CC
int
ssl_gen_key_xrdp1(int key_size_in_bits, const char* exp, int exp_len,
char* mod, int mod_len, char* pri, int pri_len);
@ -93,20 +93,20 @@ struct ssl_tls
};
/* xrdp_tls.c */
struct ssl_tls *APP_CC
struct ssl_tls *
ssl_tls_create(struct trans *trans, const char *key, const char *cert);
int APP_CC
int
ssl_tls_accept(struct ssl_tls *self, long ssl_protocols,
const char *tls_ciphers);
int APP_CC
int
ssl_tls_disconnect(struct ssl_tls *self);
void APP_CC
void
ssl_tls_delete(struct ssl_tls *self);
int APP_CC
int
ssl_tls_read(struct ssl_tls *tls, char *data, int length);
int APP_CC
int
ssl_tls_write(struct ssl_tls *tls, const char *data, int length);
int APP_CC
int
ssl_tls_can_recv(struct ssl_tls *tls, int sck, int millis);
const char *ssl_get_version(const struct ssl_st *ssl);

View File

@ -40,7 +40,7 @@
/*****************************************************************************/
/* returns error */
#if defined(_WIN32)
int APP_CC
int
tc_thread_create(unsigned long (__stdcall *start_routine)(void *), void *arg)
{
int rv = 0;
@ -54,7 +54,7 @@ tc_thread_create(unsigned long (__stdcall *start_routine)(void *), void *arg)
return rv;
}
#else
int APP_CC
int
tc_thread_create(void * (* start_routine)(void *), void *arg)
{
int rv = 0;
@ -75,7 +75,7 @@ tc_thread_create(void * (* start_routine)(void *), void *arg)
#endif
/*****************************************************************************/
tbus APP_CC
tbus
tc_get_threadid(void)
{
#if defined(_WIN32)
@ -87,7 +87,7 @@ tc_get_threadid(void)
/*****************************************************************************/
/* returns boolean */
int APP_CC
int
tc_threadid_equal(tbus tid1, tbus tid2)
{
#if defined(_WIN32)
@ -98,7 +98,7 @@ tc_threadid_equal(tbus tid1, tbus tid2)
}
/*****************************************************************************/
tbus APP_CC
tbus
tc_mutex_create(void)
{
#if defined(_WIN32)
@ -113,7 +113,7 @@ tc_mutex_create(void)
}
/*****************************************************************************/
void APP_CC
void
tc_mutex_delete(tbus mutex)
{
#if defined(_WIN32)
@ -128,7 +128,7 @@ tc_mutex_delete(tbus mutex)
}
/*****************************************************************************/
int APP_CC
int
tc_mutex_lock(tbus mutex)
{
#if defined(_WIN32)
@ -141,7 +141,7 @@ tc_mutex_lock(tbus mutex)
}
/*****************************************************************************/
int APP_CC
int
tc_mutex_unlock(tbus mutex)
{
int rv = 0;
@ -159,7 +159,7 @@ tc_mutex_unlock(tbus mutex)
}
/*****************************************************************************/
tbus APP_CC
tbus
tc_sem_create(int init_count)
{
#if defined(_WIN32)
@ -180,7 +180,7 @@ tc_sem_create(int init_count)
}
/*****************************************************************************/
void APP_CC
void
tc_sem_delete(tbus sem)
{
#if defined(_WIN32)
@ -197,7 +197,7 @@ tc_sem_delete(tbus sem)
}
/*****************************************************************************/
int APP_CC
int
tc_sem_dec(tbus sem)
{
#if defined(_WIN32)
@ -213,7 +213,7 @@ tc_sem_dec(tbus sem)
}
/*****************************************************************************/
int APP_CC
int
tc_sem_inc(tbus sem)
{
#if defined(_WIN32)

View File

@ -23,27 +23,27 @@
#include "arch.h"
int APP_CC
int
tc_thread_create(THREAD_RV (THREAD_CC * start_routine)(void*), void* arg);
tbus APP_CC
tbus
tc_get_threadid(void);
int APP_CC
int
tc_threadid_equal(tbus tid1, tbus tid2);
tbus APP_CC
tbus
tc_mutex_create(void);
void APP_CC
void
tc_mutex_delete(tbus mutex);
int APP_CC
int
tc_mutex_lock(tbus mutex);
int APP_CC
int
tc_mutex_unlock(tbus mutex);
tbus APP_CC
tbus
tc_sem_create(int init_count);
void APP_CC
void
tc_sem_delete(tbus sem);
int APP_CC
int
tc_sem_dec(tbus sem);
int APP_CC
int
tc_sem_inc(tbus sem);
#endif

View File

@ -31,7 +31,7 @@
#define MAX_SBYTES 0
/*****************************************************************************/
int APP_CC
int
trans_tls_recv(struct trans *self, char *ptr, int len)
{
if (self->tls == NULL)
@ -42,7 +42,7 @@ trans_tls_recv(struct trans *self, char *ptr, int len)
}
/*****************************************************************************/
int APP_CC
int
trans_tls_send(struct trans *self, const char *data, int len)
{
if (self->tls == NULL)
@ -53,7 +53,7 @@ trans_tls_send(struct trans *self, const char *data, int len)
}
/*****************************************************************************/
int APP_CC
int
trans_tls_can_recv(struct trans *self, int sck, int millis)
{
if (self->tls == NULL)
@ -64,21 +64,21 @@ trans_tls_can_recv(struct trans *self, int sck, int millis)
}
/*****************************************************************************/
int APP_CC
int
trans_tcp_recv(struct trans *self, char *ptr, int len)
{
return g_tcp_recv(self->sck, ptr, len, 0);
}
/*****************************************************************************/
int APP_CC
int
trans_tcp_send(struct trans *self, const char *data, int len)
{
return g_tcp_send(self->sck, data, len, 0);
}
/*****************************************************************************/
int APP_CC
int
trans_tcp_can_recv(struct trans *self, int sck, int millis)
{
return g_sck_can_recv(sck, millis);
@ -86,7 +86,6 @@ trans_tcp_can_recv(struct trans *self, int sck, int millis)
/*****************************************************************************/
struct trans *
APP_CC
trans_create(int mode, int in_size, int out_size)
{
struct trans *self = (struct trans *) NULL;
@ -111,7 +110,7 @@ trans_create(int mode, int in_size, int out_size)
}
/*****************************************************************************/
void APP_CC
void
trans_delete(struct trans *self)
{
if (self == 0)
@ -144,7 +143,7 @@ trans_delete(struct trans *self)
}
/*****************************************************************************/
int APP_CC
int
trans_get_wait_objs(struct trans *self, tbus *objs, int *count)
{
if (self == 0)
@ -173,7 +172,7 @@ trans_get_wait_objs(struct trans *self, tbus *objs, int *count)
}
/*****************************************************************************/
int APP_CC
int
trans_get_wait_objs_rw(struct trans *self, tbus *robjs, int *rcount,
tbus *wobjs, int *wcount, int *timeout)
{
@ -208,7 +207,7 @@ trans_get_wait_objs_rw(struct trans *self, tbus *robjs, int *rcount,
}
/*****************************************************************************/
int APP_CC
int
trans_send_waiting(struct trans *self, int block)
{
struct stream *temp_s;
@ -276,7 +275,7 @@ trans_send_waiting(struct trans *self, int block)
}
/*****************************************************************************/
int APP_CC
int
trans_check_wait_objs(struct trans *self)
{
tbus in_sck = (tbus) 0;
@ -430,7 +429,7 @@ trans_check_wait_objs(struct trans *self)
}
/*****************************************************************************/
int APP_CC
int
trans_force_read_s(struct trans *self, struct stream *in_s, int size)
{
int rcvd;
@ -488,14 +487,14 @@ trans_force_read_s(struct trans *self, struct stream *in_s, int size)
}
/*****************************************************************************/
int APP_CC
int
trans_force_read(struct trans *self, int size)
{
return trans_force_read_s(self, self->in_s, size);
}
/*****************************************************************************/
int APP_CC
int
trans_force_write_s(struct trans *self, struct stream *out_s)
{
int size;
@ -556,14 +555,14 @@ trans_force_write_s(struct trans *self, struct stream *out_s)
}
/*****************************************************************************/
int APP_CC
int
trans_force_write(struct trans *self)
{
return trans_force_write_s(self, self->out_s);
}
/*****************************************************************************/
int APP_CC
int
trans_write_copy_s(struct trans *self, struct stream *out_s)
{
int size;
@ -646,14 +645,14 @@ trans_write_copy_s(struct trans *self, struct stream *out_s)
}
/*****************************************************************************/
int APP_CC
int
trans_write_copy(struct trans* self)
{
return trans_write_copy_s(self, self->out_s);
}
/*****************************************************************************/
int APP_CC
int
trans_connect(struct trans *self, const char *server, const char *port,
int timeout)
{
@ -781,7 +780,7 @@ trans_connect(struct trans *self, const char *server, const char *port,
/**
* @return 0 on success, 1 on failure
*/
int APP_CC
int
trans_listen_address(struct trans *self, char *port, const char *address)
{
if (self->sck != 0)
@ -837,7 +836,7 @@ trans_listen_address(struct trans *self, char *port, const char *address)
}
/*****************************************************************************/
int APP_CC
int
trans_listen(struct trans *self, char *port)
{
return trans_listen_address(self, port, "0.0.0.0");
@ -845,7 +844,6 @@ trans_listen(struct trans *self, char *port)
/*****************************************************************************/
struct stream *
APP_CC
trans_get_in_s(struct trans *self)
{
struct stream *rv = (struct stream *) NULL;
@ -864,7 +862,6 @@ trans_get_in_s(struct trans *self)
/*****************************************************************************/
struct stream *
APP_CC
trans_get_out_s(struct trans *self, int size)
{
struct stream *rv = (struct stream *) NULL;
@ -884,7 +881,7 @@ trans_get_out_s(struct trans *self, int size)
/*****************************************************************************/
/* returns error */
int APP_CC
int
trans_set_tls_mode(struct trans *self, const char *key, const char *cert,
long ssl_protocols, const char *tls_ciphers)
{
@ -914,7 +911,7 @@ trans_set_tls_mode(struct trans *self, const char *key, const char *cert,
/*****************************************************************************/
/* returns error */
int APP_CC
int
trans_shutdown_tls_mode(struct trans *self)
{
if (self->tls != NULL)

View File

@ -37,13 +37,13 @@
struct trans; /* forward declaration */
struct xrdp_tls;
typedef int (DEFAULT_CC *ttrans_data_in)(struct trans* self);
typedef int (DEFAULT_CC *ttrans_conn_in)(struct trans* self,
typedef int (*ttrans_data_in)(struct trans* self);
typedef int (*ttrans_conn_in)(struct trans* self,
struct trans* new_self);
typedef int (DEFAULT_CC *tis_term)(void);
typedef int (APP_CC *trans_recv_proc) (struct trans *self, char *ptr, int len);
typedef int (APP_CC *trans_send_proc) (struct trans *self, const char *data, int len);
typedef int (APP_CC *trans_can_recv_proc) (struct trans *self, int sck, int millis);
typedef int (*tis_term)(void);
typedef int (*trans_recv_proc) (struct trans *self, char *ptr, int len);
typedef int (*trans_send_proc) (struct trans *self, const char *data, int len);
typedef int (*trans_can_recv_proc) (struct trans *self, int sck, int millis);
/* optional source info */
@ -88,47 +88,47 @@ struct trans
int my_source;
};
struct trans* APP_CC
struct trans*
trans_create(int mode, int in_size, int out_size);
void APP_CC
void
trans_delete(struct trans* self);
int APP_CC
int
trans_get_wait_objs(struct trans* self, tbus* objs, int* count);
int APP_CC
int
trans_get_wait_objs_rw(struct trans *self,
tbus *robjs, int *rcount,
tbus *wobjs, int *wcount, int *timeout);
int APP_CC
int
trans_check_wait_objs(struct trans* self);
int APP_CC
int
trans_force_read_s(struct trans* self, struct stream* in_s, int size);
int APP_CC
int
trans_force_write_s(struct trans* self, struct stream* out_s);
int APP_CC
int
trans_force_read(struct trans* self, int size);
int APP_CC
int
trans_force_write(struct trans* self);
int APP_CC
int
trans_write_copy(struct trans* self);
int APP_CC
int
trans_write_copy_s(struct trans* self, struct stream* out_s);
int APP_CC
int
trans_connect(struct trans* self, const char* server, const char* port,
int timeout);
int APP_CC
int
trans_listen_address(struct trans* self, char* port, const char* address);
int APP_CC
int
trans_listen(struct trans* self, char* port);
struct stream* APP_CC
struct stream*
trans_get_in_s(struct trans* self);
struct stream* APP_CC
struct stream*
trans_get_out_s(struct trans* self, int size);
int APP_CC
int
trans_set_tls_mode(struct trans *self, const char *key, const char *cert,
long ssl_protocols, const char *tls_ciphers);
int APP_CC
int
trans_shutdown_tls_mode(struct trans *self);
int APP_CC
int
trans_tcp_force_read_s(struct trans *self, struct stream *in_s, int size);
#endif

View File

@ -196,7 +196,7 @@ static tui8 g_testkey2048[376] = /* 2048 bit test key */
};
/*****************************************************************************/
static int APP_CC
static int
out_params(void)
{
g_writeln("%s", "");
@ -209,7 +209,7 @@ out_params(void)
/*****************************************************************************/
/* this is the special key signing algorithm */
static int APP_CC
static int
sign_key(const char *e_data, int e_len, const char *n_data, int n_len,
char *sign_data, int sign_len)
{
@ -285,7 +285,7 @@ sign_key(const char *e_data, int e_len, const char *n_data, int n_len,
}
/*****************************************************************************/
static int APP_CC
static int
write_out_line(int fd, const char *name, const char *data, int len)
{
int max;
@ -337,7 +337,7 @@ write_out_line(int fd, const char *name, const char *data, int len)
}
/*****************************************************************************/
static int APP_CC
static int
save_all(const char *e_data, int e_len, const char *n_data, int n_len,
const char *d_data, int d_len, const char *sign_data, int sign_len,
const char *path_and_file_name)
@ -393,7 +393,7 @@ save_all(const char *e_data, int e_len, const char *n_data, int n_len,
}
/*****************************************************************************/
static int APP_CC
static int
key_gen(const char *path_and_file_name)
{
char *e_data;
@ -459,14 +459,14 @@ key_gen(const char *path_and_file_name)
}
/*****************************************************************************/
static int APP_CC
static int
key_gen_auto(void)
{
return key_gen("/etc/xrdp/rsakeys.ini");
}
/*****************************************************************************/
static int APP_CC
static int
key_test512(void)
{
char *md5_final;
@ -509,7 +509,7 @@ key_test512(void)
}
/*****************************************************************************/
static int APP_CC
static int
key_test2048(void)
{
char *md5_final;
@ -552,7 +552,7 @@ key_test2048(void)
}
/*****************************************************************************/
int DEFAULT_CC
int
main(int argc, char **argv)
{
if (argc > 1)

View File

@ -112,7 +112,7 @@ libxrdp_get_pdu_bytes(const char *aheader)
/******************************************************************************/
/* only used during connection */
struct stream * APP_CC
struct stream *
libxrdp_force_read(struct trans* trans)
{
int bytes;
@ -967,7 +967,7 @@ libxrdp_orders_mem_blt(struct xrdp_session *session, int cache_id,
}
/******************************************************************************/
int DEFAULT_CC
int
libxrdp_orders_composite_blt(struct xrdp_session* session, int srcidx,
int srcformat, int srcwidth, int srcrepeat,
int* srctransform, int mskflags,
@ -1356,7 +1356,7 @@ libxrdp_notify_new_update(struct xrdp_session *session,
}
/*****************************************************************************/
int DEFAULT_CC
int
libxrdp_notify_delete(struct xrdp_session *session,
int window_id, int notify_id)
{
@ -1367,7 +1367,7 @@ libxrdp_notify_delete(struct xrdp_session *session,
}
/*****************************************************************************/
int DEFAULT_CC
int
libxrdp_monitored_desktop(struct xrdp_session *session,
struct rail_monitored_desktop_order *mdo,
int flags)

View File

@ -287,166 +287,166 @@ struct xrdp_mppc_enc
};
int APP_CC
int
compress_rdp(struct xrdp_mppc_enc *enc, tui8 *srcData, int len);
struct xrdp_mppc_enc * APP_CC
struct xrdp_mppc_enc *
mppc_enc_new(int protocol_type);
void APP_CC
void
mppc_enc_free(struct xrdp_mppc_enc *enc);
/* xrdp_tcp.c */
struct xrdp_tcp * APP_CC
struct xrdp_tcp *
xrdp_tcp_create(struct xrdp_iso *owner, struct trans *trans);
void APP_CC
void
xrdp_tcp_delete(struct xrdp_tcp *self);
int APP_CC
int
xrdp_tcp_init(struct xrdp_tcp *self, struct stream *s);
int APP_CC
int
xrdp_tcp_recv(struct xrdp_tcp *self, struct stream *s, int len);
int APP_CC
int
xrdp_tcp_send(struct xrdp_tcp *self, struct stream *s);
/* xrdp_iso.c */
struct xrdp_iso * APP_CC
struct xrdp_iso *
xrdp_iso_create(struct xrdp_mcs *owner, struct trans *trans);
void APP_CC
void
xrdp_iso_delete(struct xrdp_iso *self);
int APP_CC
int
xrdp_iso_init(struct xrdp_iso *self, struct stream *s);
int APP_CC
int
xrdp_iso_recv(struct xrdp_iso *self, struct stream *s);
int APP_CC
int
xrdp_iso_send(struct xrdp_iso *self, struct stream *s);
int APP_CC
int
xrdp_iso_incoming(struct xrdp_iso *self);
int APP_CC
int
xrdp_iso_detect_tpkt(struct xrdp_iso *self, struct stream *s);
/* xrdp_mcs.c */
struct xrdp_mcs * APP_CC
struct xrdp_mcs *
xrdp_mcs_create(struct xrdp_sec *owner, struct trans *trans,
struct stream *client_mcs_data,
struct stream *server_mcs_data);
void APP_CC
void
xrdp_mcs_delete(struct xrdp_mcs *self);
int APP_CC
int
xrdp_mcs_init(struct xrdp_mcs *self, struct stream *s);
int APP_CC
int
xrdp_mcs_recv(struct xrdp_mcs *self, struct stream *s, int *chan);
int APP_CC
int
xrdp_mcs_send(struct xrdp_mcs *self, struct stream *s, int chan);
int APP_CC
int
xrdp_mcs_incoming(struct xrdp_mcs *self);
int APP_CC
int
xrdp_mcs_disconnect(struct xrdp_mcs *self);
/* xrdp_sec.c */
struct xrdp_sec *APP_CC
struct xrdp_sec *
xrdp_sec_create(struct xrdp_rdp *owner, struct trans *trans);
void APP_CC
void
xrdp_sec_delete(struct xrdp_sec *self);
int APP_CC
int
xrdp_sec_init(struct xrdp_sec *self, struct stream *s);
int APP_CC
int
xrdp_sec_get_fastpath_bytes(struct xrdp_sec *self);
int APP_CC
int
xrdp_sec_init_fastpath(struct xrdp_sec *self, struct stream *s);
int APP_CC
int
xrdp_sec_send_fastpath(struct xrdp_sec *self, struct stream *s);
int APP_CC
int
xrdp_sec_recv_fastpath(struct xrdp_sec *self, struct stream *s);
int APP_CC
int
xrdp_sec_recv(struct xrdp_sec *self, struct stream *s, int *chan);
int APP_CC
int
xrdp_sec_send(struct xrdp_sec *self, struct stream *s, int chan);
int APP_CC
int
xrdp_sec_process_mcs_data(struct xrdp_sec *self);
int APP_CC
int
xrdp_sec_incoming(struct xrdp_sec *self);
int APP_CC
int
xrdp_sec_disconnect(struct xrdp_sec *self);
/* xrdp_rdp.c */
struct xrdp_rdp * APP_CC
struct xrdp_rdp *
xrdp_rdp_create(struct xrdp_session *session, struct trans *trans);
void APP_CC
void
xrdp_rdp_delete(struct xrdp_rdp *self);
int APP_CC
int
xrdp_rdp_init(struct xrdp_rdp *self, struct stream *s);
int APP_CC
int
xrdp_rdp_init_data(struct xrdp_rdp *self, struct stream *s);
int APP_CC
int
xrdp_rdp_get_fastpath_bytes(struct xrdp_rdp *self);
int APP_CC
int
xrdp_rdp_init_fastpath(struct xrdp_rdp *self, struct stream *s);
int APP_CC
int
xrdp_rdp_recv(struct xrdp_rdp *self, struct stream *s, int *code);
int APP_CC
int
xrdp_rdp_send(struct xrdp_rdp *self, struct stream *s, int pdu_type);
int APP_CC
int
xrdp_rdp_send_data(struct xrdp_rdp *self, struct stream *s,
int data_pdu_type);
int APP_CC
int
xrdp_rdp_send_fastpath(struct xrdp_rdp *self, struct stream *s,
int data_pdu_type);
int APP_CC
int
xrdp_rdp_send_data_update_sync(struct xrdp_rdp *self);
int APP_CC
int
xrdp_rdp_incoming(struct xrdp_rdp *self);
int APP_CC
int
xrdp_rdp_process_data(struct xrdp_rdp *self, struct stream *s);
int APP_CC
int
xrdp_rdp_disconnect(struct xrdp_rdp *self);
int APP_CC
int
xrdp_rdp_send_deactivate(struct xrdp_rdp *self);
int APP_CC
int
xrdp_rdp_send_session_info(struct xrdp_rdp *self, const char *data,
int data_bytes);
/* xrdp_orders.c */
struct xrdp_orders * APP_CC
struct xrdp_orders *
xrdp_orders_create(struct xrdp_session *session,
struct xrdp_rdp *rdp_layer);
void APP_CC
void
xrdp_orders_delete(struct xrdp_orders *self);
int APP_CC
int
xrdp_orders_reset(struct xrdp_orders *self);
int APP_CC
int
xrdp_orders_init(struct xrdp_orders *self);
int APP_CC
int
xrdp_orders_send(struct xrdp_orders *self);
int APP_CC
int
xrdp_orders_force_send(struct xrdp_orders *self);
int APP_CC
int
xrdp_orders_check(struct xrdp_orders *self, int max_size);
int APP_CC
int
xrdp_orders_rect(struct xrdp_orders *self, int x, int y, int cx, int cy,
int color, struct xrdp_rect *rect);
int APP_CC
int
xrdp_orders_screen_blt(struct xrdp_orders *self, int x, int y,
int cx, int cy, int srcx, int srcy,
int rop, struct xrdp_rect *rect);
int APP_CC
int
xrdp_orders_pat_blt(struct xrdp_orders *self, int x, int y,
int cx, int cy, int rop, int bg_color,
int fg_color, struct xrdp_brush *brush,
struct xrdp_rect *rect);
int APP_CC
int
xrdp_orders_dest_blt(struct xrdp_orders *self, int x, int y,
int cx, int cy, int rop,
struct xrdp_rect *rect);
int APP_CC
int
xrdp_orders_line(struct xrdp_orders *self, int mix_mode,
int startx, int starty,
int endx, int endy, int rop, int bg_color,
struct xrdp_pen *pen,
struct xrdp_rect *rect);
int APP_CC
int
xrdp_orders_mem_blt(struct xrdp_orders *self, int cache_id,
int color_table, int x, int y, int cx, int cy,
int rop, int srcx, int srcy,
int cache_idx, struct xrdp_rect *rect);
int APP_CC
int
xrdp_orders_composite_blt(struct xrdp_orders *self, int srcidx,
int srcformat, int srcwidth,
int srcrepeat, int *srctransform, int mskflags,
@ -455,7 +455,7 @@ xrdp_orders_composite_blt(struct xrdp_orders *self, int srcidx,
int mskx, int msky, int dstx, int dsty,
int width, int height, int dstformat,
struct xrdp_rect *rect);
int APP_CC
int
xrdp_orders_text(struct xrdp_orders *self,
int font, int flags, int mixmode,
int fg_color, int bg_color,
@ -465,61 +465,61 @@ xrdp_orders_text(struct xrdp_orders *self,
int box_right, int box_bottom,
int x, int y, char *data, int data_len,
struct xrdp_rect *rect);
int APP_CC
int
xrdp_orders_send_palette(struct xrdp_orders *self, int *palette,
int cache_id);
int APP_CC
int
xrdp_orders_send_raw_bitmap(struct xrdp_orders *self,
int width, int height, int bpp, char *data,
int cache_id, int cache_idx);
int APP_CC
int
xrdp_orders_send_bitmap(struct xrdp_orders *self,
int width, int height, int bpp, char *data,
int cache_id, int cache_idx);
int APP_CC
int
xrdp_orders_send_font(struct xrdp_orders *self,
struct xrdp_font_char *font_char,
int font_index, int char_index);
int APP_CC
int
xrdp_orders_send_raw_bitmap2(struct xrdp_orders *self,
int width, int height, int bpp, char *data,
int cache_id, int cache_idx);
int APP_CC
int
xrdp_orders_send_bitmap2(struct xrdp_orders *self,
int width, int height, int bpp, char *data,
int cache_id, int cache_idx, int hints);
int APP_CC
int
xrdp_orders_send_bitmap3(struct xrdp_orders *self,
int width, int height, int bpp, char *data,
int cache_id, int cache_idx, int hints);
int APP_CC
int
xrdp_orders_send_brush(struct xrdp_orders *self, int width, int height,
int bpp, int type, int size, char *data, int cache_id);
int APP_CC
int
xrdp_orders_send_create_os_surface(struct xrdp_orders *self, int id,
int width, int height,
struct list *del_list);
int APP_CC
int
xrdp_orders_send_switch_os_surface(struct xrdp_orders *self, int id);
/* xrdp_bitmap_compress.c */
int APP_CC
int
xrdp_bitmap_compress(char *in_data, int width, int height,
struct stream *s, int bpp, int byte_limit,
int start_line, struct stream *temp_s,
int e);
int APP_CC
int
xrdp_bitmap32_compress(char *in_data, int width, int height,
struct stream *s, int bpp, int byte_limit,
int start_line, struct stream *temp_s,
int e, int flags);
int APP_CC
int
xrdp_jpeg_compress(void *handle, char *in_data, int width, int height,
struct stream *s, int bpp, int byte_limit,
int start_line, struct stream *temp_s,
int e, int quality);
int APP_CC
int
xrdp_codec_jpeg_compress(void *handle,
int format, /* input data format */
char *inp_data, /* input data */
@ -536,42 +536,42 @@ xrdp_codec_jpeg_compress(void *handle,
/* len of compressed data */
);
void *APP_CC
void *
xrdp_jpeg_init(void);
int APP_CC
int
xrdp_jpeg_deinit(void *handle);
/* xrdp_channel.c */
struct xrdp_channel* APP_CC
struct xrdp_channel*
xrdp_channel_create(struct xrdp_sec *owner, struct xrdp_mcs *mcs_layer);
void APP_CC
void
xrdp_channel_delete(struct xrdp_channel *self);
int APP_CC
int
xrdp_channel_init(struct xrdp_channel *self, struct stream *s);
int APP_CC
int
xrdp_channel_send(struct xrdp_channel *self, struct stream *s, int channel_id,
int total_data_len, int flags);
int APP_CC
int
xrdp_channel_process(struct xrdp_channel *self, struct stream *s,
int chanid);
/* xrdp_fastpath.c */
struct xrdp_fastpath *APP_CC
struct xrdp_fastpath *
xrdp_fastpath_create(struct xrdp_sec *owner, struct trans *trans);
void APP_CC
void
xrdp_fastpath_delete(struct xrdp_fastpath *self);
int APP_CC
int
xrdp_fastpath_recv(struct xrdp_fastpath *self, struct stream *s);
int APP_CC
int
xrdp_fastpath_process_input_event(struct xrdp_fastpath *self, struct stream *s);
int APP_CC
int
xrdp_fastpath_init(struct xrdp_fastpath *self, struct stream *s);
int APP_CC
int
xrdp_fastpath_send(struct xrdp_fastpath *self, struct stream *s);
/* xrdp_caps.c */
int APP_CC
int
xrdp_caps_send_demand_active(struct xrdp_rdp *self);
int APP_CC
int
xrdp_caps_process_confirm_active(struct xrdp_rdp *self, struct stream *s);
#endif

View File

@ -76,66 +76,66 @@ struct xrdp_session
struct source_info si;
};
struct xrdp_session * DEFAULT_CC
struct xrdp_session *
libxrdp_init(tbus id, struct trans *trans);
int DEFAULT_CC
int
libxrdp_exit(struct xrdp_session *session);
int DEFAULT_CC
int
libxrdp_disconnect(struct xrdp_session *session);
int DEFAULT_CC
int
libxrdp_process_incoming(struct xrdp_session *session);
int EXPORT_CC
libxrdp_get_pdu_bytes(const char *aheader);
struct stream * APP_CC
struct stream *
libxrdp_force_read(struct trans *trans);
int DEFAULT_CC
int
libxrdp_process_data(struct xrdp_session *session, struct stream *s);
int DEFAULT_CC
int
libxrdp_send_palette(struct xrdp_session *session, int *palette);
int DEFAULT_CC
int
libxrdp_send_bell(struct xrdp_session *session);
int DEFAULT_CC
int
libxrdp_send_bitmap(struct xrdp_session *session, int width, int height,
int bpp, char *data, int x, int y, int cx, int cy);
int DEFAULT_CC
int
libxrdp_send_pointer(struct xrdp_session *session, int cache_idx,
char *data, char *mask, int x, int y, int bpp);
int DEFAULT_CC
int
libxrdp_set_pointer(struct xrdp_session *session, int cache_idx);
int DEFAULT_CC
int
libxrdp_orders_init(struct xrdp_session *session);
int DEFAULT_CC
int
libxrdp_orders_send(struct xrdp_session *session);
int DEFAULT_CC
int
libxrdp_orders_force_send(struct xrdp_session *session);
int DEFAULT_CC
int
libxrdp_orders_rect(struct xrdp_session *session, int x, int y,
int cx, int cy, int color, struct xrdp_rect *rect);
int DEFAULT_CC
int
libxrdp_orders_screen_blt(struct xrdp_session *session, int x, int y,
int cx, int cy, int srcx, int srcy,
int rop, struct xrdp_rect *rect);
int DEFAULT_CC
int
libxrdp_orders_pat_blt(struct xrdp_session *session, int x, int y,
int cx, int cy, int rop, int bg_color,
int fg_color, struct xrdp_brush *brush,
struct xrdp_rect *rect);
int DEFAULT_CC
int
libxrdp_orders_dest_blt(struct xrdp_session *session, int x, int y,
int cx, int cy, int rop,
struct xrdp_rect *rect);
int DEFAULT_CC
int
libxrdp_orders_line(struct xrdp_session *session, int mix_mode,
int startx, int starty,
int endx, int endy, int rop, int bg_color,
struct xrdp_pen *pen,
struct xrdp_rect *rect);
int DEFAULT_CC
int
libxrdp_orders_mem_blt(struct xrdp_session *session, int cache_id,
int color_table, int x, int y, int cx, int cy,
int rop, int srcx, int srcy,
int cache_idx, struct xrdp_rect *rect);
int DEFAULT_CC
int
libxrdp_orders_composite_blt(struct xrdp_session *session, int srcidx,
int srcformat, int srcwidth, int srcrepeat,
int *srctransform, int mskflags,
@ -145,7 +145,7 @@ libxrdp_orders_composite_blt(struct xrdp_session *session, int srcidx,
int width, int height, int dstformat,
struct xrdp_rect *rect);
int DEFAULT_CC
int
libxrdp_orders_text(struct xrdp_session *session,
int font, int flags, int mixmode,
int fg_color, int bg_color,
@ -155,89 +155,89 @@ libxrdp_orders_text(struct xrdp_session *session,
int box_right, int box_bottom,
int x, int y, char *data, int data_len,
struct xrdp_rect *rect);
int DEFAULT_CC
int
libxrdp_orders_send_palette(struct xrdp_session *session, int *palette,
int cache_id);
int DEFAULT_CC
int
libxrdp_orders_send_raw_bitmap(struct xrdp_session *session,
int width, int height, int bpp, char *data,
int cache_id, int cache_idx);
int DEFAULT_CC
int
libxrdp_orders_send_bitmap(struct xrdp_session *session,
int width, int height, int bpp, char *data,
int cache_id, int cache_idx);
int DEFAULT_CC
int
libxrdp_orders_send_font(struct xrdp_session *session,
struct xrdp_font_char *font_char,
int font_index, int char_index);
int DEFAULT_CC
int
libxrdp_reset(struct xrdp_session *session,
int width, int height, int bpp);
int DEFAULT_CC
int
libxrdp_orders_send_raw_bitmap2(struct xrdp_session *session,
int width, int height, int bpp, char *data,
int cache_id, int cache_idx);
int DEFAULT_CC
int
libxrdp_orders_send_bitmap2(struct xrdp_session *session,
int width, int height, int bpp, char *data,
int cache_id, int cache_idx, int hints);
int DEFAULT_CC
int
libxrdp_orders_send_bitmap3(struct xrdp_session *session,
int width, int height, int bpp, char *data,
int cache_id, int cache_idx, int hints);
int DEFAULT_CC
int
libxrdp_query_channel(struct xrdp_session *session, int index,
char *channel_name, int *channel_flags);
int DEFAULT_CC
int
libxrdp_get_channel_id(struct xrdp_session *session, const char *name);
int DEFAULT_CC
int
libxrdp_send_to_channel(struct xrdp_session *session, int channel_id,
char *data, int data_len,
int total_data_len, int flags);
int DEFAULT_CC
int
libxrdp_orders_send_brush(struct xrdp_session *session,
int width, int height, int bpp, int type,
int size, char *data, int cache_id);
int DEFAULT_CC
int
libxrdp_orders_send_create_os_surface(struct xrdp_session *session, int id,
int width, int height,
struct list *del_list);
int DEFAULT_CC
int
libxrdp_orders_send_switch_os_surface(struct xrdp_session *session, int id);
int DEFAULT_CC
int
libxrdp_window_new_update(struct xrdp_session *session, int window_id,
struct rail_window_state_order *window_state,
int flags);
int DEFAULT_CC
int
libxrdp_window_delete(struct xrdp_session *session, int window_id);
int DEFAULT_CC
int
libxrdp_window_icon(struct xrdp_session *session, int window_id,
int cache_entry, int cache_id,
struct rail_icon_info *icon_info, int flags);
int DEFAULT_CC
int
libxrdp_window_cached_icon(struct xrdp_session *session, int window_id,
int cache_entry, int cache_id,
int flags);
int DEFAULT_CC
int
libxrdp_notify_new_update(struct xrdp_session *session,
int window_id, int notify_id,
struct rail_notify_state_order *notify_state,
int flags);
int DEFAULT_CC
int
libxrdp_notify_delete(struct xrdp_session *session,
int window_id, int notify_id);
int DEFAULT_CC
int
libxrdp_monitored_desktop(struct xrdp_session *session,
struct rail_monitored_desktop_order *mdo,
int flags);
int DEFAULT_CC
int
libxrdp_codec_jpeg_compress(struct xrdp_session *session,
int format, char *inp_data,
int width, int height,
int stride, int x, int y,
int cx, int cy, int quality,
char *out_data, int *io_len);
int DEFAULT_CC
int
libxrdp_fastpath_send_surface(struct xrdp_session *session,
char *data_pad, int pad_bytes,
int data_bytes,

View File

@ -41,7 +41,7 @@ http://msdn.microsoft.com/en-us/library/cc241877.aspx
/*****************************************************************************/
/* split RGB */
static int APP_CC
static int
fsplit3(char *in_data, int start_line, int width, int e,
char *r_data, char *g_data, char *b_data)
{
@ -121,7 +121,7 @@ fsplit3(char *in_data, int start_line, int width, int e,
/*****************************************************************************/
/* split ARGB */
static int APP_CC
static int
fsplit4(char *in_data, int start_line, int width, int e,
char *a_data, char *r_data, char *g_data, char *b_data)
{
@ -218,7 +218,7 @@ do { \
} while (0)
/*****************************************************************************/
static int APP_CC
static int
fdelta(char *in_plane, char *out_plane, int cx, int cy)
{
char delta;
@ -250,7 +250,7 @@ fdelta(char *in_plane, char *out_plane, int cx, int cy)
}
/*****************************************************************************/
static int APP_CC
static int
fout(int collen, int replen, char *colptr, struct stream *s)
{
int code;
@ -315,7 +315,7 @@ fout(int collen, int replen, char *colptr, struct stream *s)
}
/*****************************************************************************/
static int APP_CC
static int
fpack(char *plane, int cx, int cy, struct stream *s)
{
char *ptr8;
@ -382,7 +382,7 @@ fpack(char *plane, int cx, int cy, struct stream *s)
}
/*****************************************************************************/
static int APP_CC
static int
foutraw3(struct stream *s, int bytes, int header,
char *r_data, char *g_data, char *b_data)
{
@ -396,7 +396,7 @@ foutraw3(struct stream *s, int bytes, int header,
}
/*****************************************************************************/
static int APP_CC
static int
foutraw4(struct stream *s, int bytes, int header,
char *a_data, char *r_data, char *g_data, char *b_data)
{
@ -412,7 +412,7 @@ foutraw4(struct stream *s, int bytes, int header,
/*****************************************************************************/
/* returns the number of lines compressed */
int APP_CC
int
xrdp_bitmap32_compress(char *in_data, int width, int height,
struct stream *s, int bpp, int byte_limit,
int start_line, struct stream *temp_s,

View File

@ -648,7 +648,7 @@
} while (0)
/*****************************************************************************/
int APP_CC
int
xrdp_bitmap_compress(char *in_data, int width, int height,
struct stream *s, int bpp, int byte_limit,
int start_line, struct stream *temp_s,

View File

@ -26,7 +26,7 @@
#include "libxrdp.h"
/*****************************************************************************/
static int APP_CC
static int
xrdp_caps_send_monitorlayout(struct xrdp_rdp *self)
{
struct stream *s;
@ -66,7 +66,7 @@ xrdp_caps_send_monitorlayout(struct xrdp_rdp *self)
}
/*****************************************************************************/
static int APP_CC
static int
xrdp_caps_process_general(struct xrdp_rdp *self, struct stream *s,
int len)
{
@ -101,7 +101,7 @@ xrdp_caps_process_general(struct xrdp_rdp *self, struct stream *s,
}
/*****************************************************************************/
static int APP_CC
static int
xrdp_caps_process_order(struct xrdp_rdp *self, struct stream *s,
int len)
{
@ -178,7 +178,7 @@ xrdp_caps_process_order(struct xrdp_rdp *self, struct stream *s,
/*****************************************************************************/
/* get the bitmap cache size */
static int APP_CC
static int
xrdp_caps_process_bmpcache(struct xrdp_rdp *self, struct stream *s,
int len)
{
@ -220,7 +220,7 @@ xrdp_caps_process_bmpcache(struct xrdp_rdp *self, struct stream *s,
/*****************************************************************************/
/* get the bitmap cache size */
static int APP_CC
static int
xrdp_caps_process_bmpcache2(struct xrdp_rdp *self, struct stream *s,
int len)
{
@ -263,7 +263,7 @@ xrdp_caps_process_bmpcache2(struct xrdp_rdp *self, struct stream *s,
}
/*****************************************************************************/
static int APP_CC
static int
xrdp_caps_process_cache_v3_codec_id(struct xrdp_rdp *self, struct stream *s,
int len)
{
@ -283,7 +283,7 @@ xrdp_caps_process_cache_v3_codec_id(struct xrdp_rdp *self, struct stream *s,
/*****************************************************************************/
/* get the number of client cursor cache */
static int APP_CC
static int
xrdp_caps_process_pointer(struct xrdp_rdp *self, struct stream *s,
int len)
{
@ -325,7 +325,7 @@ xrdp_caps_process_pointer(struct xrdp_rdp *self, struct stream *s,
}
/*****************************************************************************/
static int APP_CC
static int
xrdp_caps_process_input(struct xrdp_rdp *self, struct stream *s,
int len)
{
@ -344,7 +344,7 @@ xrdp_caps_process_input(struct xrdp_rdp *self, struct stream *s,
/*****************************************************************************/
/* get the type of client brush cache */
int APP_CC
int
xrdp_caps_process_brushcache(struct xrdp_rdp *self, struct stream *s,
int len)
{
@ -361,7 +361,7 @@ xrdp_caps_process_brushcache(struct xrdp_rdp *self, struct stream *s,
}
/*****************************************************************************/
int APP_CC
int
xrdp_caps_process_offscreen_bmpcache(struct xrdp_rdp *self, struct stream *s,
int len)
{
@ -387,7 +387,7 @@ xrdp_caps_process_offscreen_bmpcache(struct xrdp_rdp *self, struct stream *s,
}
/*****************************************************************************/
int APP_CC
int
xrdp_caps_process_rail(struct xrdp_rdp *self, struct stream *s, int len)
{
int i32;
@ -405,7 +405,7 @@ xrdp_caps_process_rail(struct xrdp_rdp *self, struct stream *s, int len)
}
/*****************************************************************************/
static int APP_CC
static int
xrdp_caps_process_window(struct xrdp_rdp *self, struct stream *s, int len)
{
int i32;
@ -430,7 +430,7 @@ xrdp_caps_process_window(struct xrdp_rdp *self, struct stream *s, int len)
}
/*****************************************************************************/
static int APP_CC
static int
xrdp_caps_process_codecs(struct xrdp_rdp *self, struct stream *s, int len)
{
int codec_id;
@ -525,7 +525,7 @@ xrdp_caps_process_codecs(struct xrdp_rdp *self, struct stream *s, int len)
}
/*****************************************************************************/
static int APP_CC
static int
xrdp_caps_process_multifragmentupdate(struct xrdp_rdp *self, struct stream *s,
int len)
{
@ -537,7 +537,7 @@ xrdp_caps_process_multifragmentupdate(struct xrdp_rdp *self, struct stream *s,
}
/*****************************************************************************/
static int APP_CC
static int
xrdp_caps_process_frame_ack(struct xrdp_rdp *self, struct stream *s, int len)
{
g_writeln("xrdp_caps_process_frame_ack:");
@ -554,7 +554,7 @@ xrdp_caps_process_frame_ack(struct xrdp_rdp *self, struct stream *s, int len)
}
/*****************************************************************************/
static int APP_CC
static int
xrdp_caps_process_surface_cmds(struct xrdp_rdp *self, struct stream *s, int len)
{
int cmdFlags;
@ -566,7 +566,7 @@ xrdp_caps_process_surface_cmds(struct xrdp_rdp *self, struct stream *s, int len)
}
/*****************************************************************************/
int APP_CC
int
xrdp_caps_process_confirm_active(struct xrdp_rdp *self, struct stream *s)
{
int cap_len;
@ -717,7 +717,7 @@ xrdp_caps_process_confirm_active(struct xrdp_rdp *self, struct stream *s)
return 0;
}
/*****************************************************************************/
int APP_CC
int
xrdp_caps_send_demand_active(struct xrdp_rdp *self)
{
struct stream *s;

View File

@ -33,7 +33,7 @@
/*****************************************************************************/
/* returns pointer or nil on error */
static struct mcs_channel_item *APP_CC
static struct mcs_channel_item *
xrdp_channel_get_item(struct xrdp_channel *self, int channel_id)
{
struct mcs_channel_item *channel;
@ -50,7 +50,7 @@ xrdp_channel_get_item(struct xrdp_channel *self, int channel_id)
}
/*****************************************************************************/
struct xrdp_channel *APP_CC
struct xrdp_channel *
xrdp_channel_create(struct xrdp_sec *owner, struct xrdp_mcs *mcs_layer)
{
struct xrdp_channel *self;
@ -63,7 +63,7 @@ xrdp_channel_create(struct xrdp_sec *owner, struct xrdp_mcs *mcs_layer)
/*****************************************************************************/
/* returns error */
void APP_CC
void
xrdp_channel_delete(struct xrdp_channel *self)
{
if (self == 0)
@ -77,7 +77,7 @@ xrdp_channel_delete(struct xrdp_channel *self)
/*****************************************************************************/
/* returns error */
int APP_CC
int
xrdp_channel_init(struct xrdp_channel *self, struct stream *s)
{
if (xrdp_sec_init(self->sec_layer, s) != 0)
@ -92,7 +92,7 @@ xrdp_channel_init(struct xrdp_channel *self, struct stream *s)
/*****************************************************************************/
/* returns error */
/* This sends data out to the secure layer. */
int APP_CC
int
xrdp_channel_send(struct xrdp_channel *self, struct stream *s, int channel_id,
int total_data_len, int flags)
{
@ -140,7 +140,7 @@ xrdp_channel_send(struct xrdp_channel *self, struct stream *s, int channel_id,
/* returns error */
/* this will inform the callback, whatever it is that some channel data is
ready. the default for this is a call to xrdp_wm.c. */
static int APP_CC
static int
xrdp_channel_call_callback(struct xrdp_channel *self, struct stream *s,
int channel_id,
int total_data_len, int flags)
@ -181,7 +181,7 @@ xrdp_channel_call_callback(struct xrdp_channel *self, struct stream *s,
channel packet.
'chanid' passed in here is the mcs channel id so it MCS_GLOBAL_CHANNEL
plus something. */
int APP_CC
int
xrdp_channel_process(struct xrdp_channel *self, struct stream *s,
int chanid)
{

View File

@ -24,7 +24,7 @@
#include "libxrdp.h"
/*****************************************************************************/
struct xrdp_fastpath *APP_CC
struct xrdp_fastpath *
xrdp_fastpath_create(struct xrdp_sec *owner, struct trans *trans)
{
struct xrdp_fastpath *self;
@ -39,7 +39,7 @@ xrdp_fastpath_create(struct xrdp_sec *owner, struct trans *trans)
}
/*****************************************************************************/
void APP_CC
void
xrdp_fastpath_delete(struct xrdp_fastpath *self)
{
if (self == 0)
@ -51,14 +51,14 @@ xrdp_fastpath_delete(struct xrdp_fastpath *self)
/*****************************************************************************/
/* returns error */
int APP_CC
int
xrdp_fastpath_reset(struct xrdp_fastpath *self)
{
return 0;
}
/*****************************************************************************/
int APP_CC
int
xrdp_fastpath_recv(struct xrdp_fastpath *self, struct stream *s)
{
int fp_hdr;
@ -102,7 +102,7 @@ xrdp_fastpath_recv(struct xrdp_fastpath *self, struct stream *s)
/*****************************************************************************/
/* no fragmentation */
int APP_CC
int
xrdp_fastpath_init(struct xrdp_fastpath *self, struct stream *s)
{
int bytes;
@ -117,7 +117,7 @@ xrdp_fastpath_init(struct xrdp_fastpath *self, struct stream *s)
}
/*****************************************************************************/
static int APP_CC
static int
xrdp_fastpath_session_callback(struct xrdp_fastpath *self, int msg,
long param1, long param2,
long param3, long param4)
@ -138,7 +138,7 @@ xrdp_fastpath_session_callback(struct xrdp_fastpath *self, int msg,
/*****************************************************************************/
/* no fragmentation */
int APP_CC
int
xrdp_fastpath_send(struct xrdp_fastpath *self, struct stream *s)
{
if (trans_write_copy_s(self->trans, s) != 0)
@ -151,7 +151,7 @@ xrdp_fastpath_send(struct xrdp_fastpath *self, struct stream *s)
/*****************************************************************************/
/* FASTPATH_INPUT_EVENT_SCANCODE */
static int APP_CC
static int
xrdp_fastpath_process_EVENT_SCANCODE(struct xrdp_fastpath *self,
int eventFlags, struct stream *s)
{
@ -185,7 +185,7 @@ xrdp_fastpath_process_EVENT_SCANCODE(struct xrdp_fastpath *self,
/*****************************************************************************/
/* FASTPATH_INPUT_EVENT_MOUSE */
static int APP_CC
static int
xrdp_fastpath_process_EVENT_MOUSE(struct xrdp_fastpath *self,
int eventFlags, struct stream *s)
{
@ -215,7 +215,7 @@ xrdp_fastpath_process_EVENT_MOUSE(struct xrdp_fastpath *self,
/*****************************************************************************/
/* FASTPATH_INPUT_EVENT_MOUSEX */
static int APP_CC
static int
xrdp_fastpath_process_EVENT_MOUSEX(struct xrdp_fastpath *self,
int eventFlags, struct stream *s)
{
@ -245,7 +245,7 @@ xrdp_fastpath_process_EVENT_MOUSEX(struct xrdp_fastpath *self,
/*****************************************************************************/
/* FASTPATH_INPUT_EVENT_SYNC */
static int APP_CC
static int
xrdp_fastpath_process_EVENT_SYNC(struct xrdp_fastpath *self,
int eventFlags, struct stream *s)
{
@ -265,7 +265,7 @@ xrdp_fastpath_process_EVENT_SYNC(struct xrdp_fastpath *self,
/*****************************************************************************/
/* FASTPATH_INPUT_EVENT_UNICODE */
static int APP_CC
static int
xrdp_fastpath_process_EVENT_UNICODE(struct xrdp_fastpath *self,
int eventFlags, struct stream *s)
{
@ -297,7 +297,7 @@ xrdp_fastpath_process_EVENT_UNICODE(struct xrdp_fastpath *self,
/*****************************************************************************/
/* FASTPATH_INPUT_EVENT */
int APP_CC
int
xrdp_fastpath_process_input_event(struct xrdp_fastpath *self,
struct stream *s)
{

View File

@ -37,7 +37,6 @@
/*****************************************************************************/
struct xrdp_iso *
APP_CC
xrdp_iso_create(struct xrdp_mcs *owner, struct trans *trans)
{
struct xrdp_iso *self;
@ -51,7 +50,7 @@ xrdp_iso_create(struct xrdp_mcs *owner, struct trans *trans)
}
/*****************************************************************************/
void APP_CC
void
xrdp_iso_delete(struct xrdp_iso *self)
{
if (self == 0)
@ -64,7 +63,7 @@ xrdp_iso_delete(struct xrdp_iso *self)
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
xrdp_iso_negotiate_security(struct xrdp_iso *self)
{
int rv = 0;
@ -123,7 +122,7 @@ xrdp_iso_negotiate_security(struct xrdp_iso *self)
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
xrdp_iso_process_rdp_neg_req(struct xrdp_iso *self, struct stream *s)
{
int flags;
@ -155,7 +154,7 @@ xrdp_iso_process_rdp_neg_req(struct xrdp_iso *self, struct stream *s)
}
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
xrdp_iso_recv_msg(struct xrdp_iso *self, struct stream *s, int *code, int *len)
{
int ver;
@ -216,7 +215,7 @@ xrdp_iso_recv_msg(struct xrdp_iso *self, struct stream *s, int *code, int *len)
/*****************************************************************************/
/* returns error */
int APP_CC
int
xrdp_iso_recv(struct xrdp_iso *self, struct stream *s)
{
int code;
@ -240,7 +239,7 @@ xrdp_iso_recv(struct xrdp_iso *self, struct stream *s)
return 0;
}
/*****************************************************************************/
static int APP_CC
static int
xrdp_iso_send_cc(struct xrdp_iso *self)
{
struct stream *s;
@ -304,7 +303,7 @@ xrdp_iso_send_cc(struct xrdp_iso *self)
}
/*****************************************************************************/
/* returns error */
int APP_CC
int
xrdp_iso_incoming(struct xrdp_iso *self)
{
int rv = 0;
@ -398,7 +397,7 @@ xrdp_iso_incoming(struct xrdp_iso *self)
/*****************************************************************************/
/* returns error */
int APP_CC
int
xrdp_iso_init(struct xrdp_iso *self, struct stream *s)
{
init_stream(s, 8192 * 4); /* 32 KB */
@ -408,7 +407,7 @@ xrdp_iso_init(struct xrdp_iso *self, struct stream *s)
/*****************************************************************************/
/* returns error */
int APP_CC
int
xrdp_iso_send(struct xrdp_iso *self, struct stream *s)
{
int len;

View File

@ -35,7 +35,7 @@
#include "log.h"
/*****************************************************************************/
int APP_CC
int
xrdp_jpeg_compress(void *handle, char *in_data, int width, int height,
struct stream *s, int bpp, int byte_limit,
int start_line, struct stream *temp_s,
@ -118,7 +118,7 @@ xrdp_jpeg_compress(void *handle, char *in_data, int width, int height,
* frame buffer (inp_data)
*****************************************************************************/
int APP_CC
int
xrdp_codec_jpeg_compress(void *handle,
int format, /* input data format */
char *inp_data, /* input data */
@ -198,7 +198,7 @@ xrdp_codec_jpeg_compress(void *handle,
}
/*****************************************************************************/
void *APP_CC
void *
xrdp_jpeg_init(void)
{
tjhandle tj_han;
@ -208,7 +208,7 @@ xrdp_jpeg_init(void)
}
/*****************************************************************************/
int APP_CC
int
xrdp_jpeg_deinit(void *handle)
{
tjhandle tj_han;
@ -243,7 +243,7 @@ struct mydata_comp
/*****************************************************************************/
/* called at beginning */
static void DEFAULT_CC
static void
my_init_destination(j_compress_ptr cinfo)
{
struct mydata_comp *md;
@ -257,7 +257,7 @@ my_init_destination(j_compress_ptr cinfo)
/*****************************************************************************/
/* called when buffer is full and we need more space */
static int DEFAULT_CC
static int
my_empty_output_buffer(j_compress_ptr cinfo)
{
struct mydata_comp *md;
@ -274,7 +274,7 @@ my_empty_output_buffer(j_compress_ptr cinfo)
/*****************************************************************************/
/* called at end */
static void DEFAULT_CC
static void
my_term_destination(j_compress_ptr cinfo)
{
struct mydata_comp *md;
@ -286,7 +286,7 @@ my_term_destination(j_compress_ptr cinfo)
}
/*****************************************************************************/
static int APP_CC
static int
jp_do_compress(JOCTET *data, int width, int height, int bpp, int quality,
JOCTET *comp_data, int *comp_data_bytes)
{
@ -353,7 +353,7 @@ jp_do_compress(JOCTET *data, int width, int height, int bpp, int quality,
}
/*****************************************************************************/
static int APP_CC
static int
jpeg_compress(char *in_data, int width, int height,
struct stream *s, struct stream *temp_s, int bpp,
int byte_limit, int e, int quality)
@ -411,7 +411,7 @@ jpeg_compress(char *in_data, int width, int height,
}
/*****************************************************************************/
int APP_CC
int
xrdp_jpeg_compress(void *handle, char *in_data, int width, int height,
struct stream *s, int bpp, int byte_limit,
int start_line, struct stream *temp_s,
@ -423,7 +423,7 @@ xrdp_jpeg_compress(void *handle, char *in_data, int width, int height,
}
/*****************************************************************************/
int APP_CC
int
xrdp_codec_jpeg_compress(void *handle, int format, char *inp_data, int width,
int height, int stride, int x, int y, int cx, int cy,
int quality, char *out_data, int *io_len)
@ -432,14 +432,14 @@ xrdp_codec_jpeg_compress(void *handle, int format, char *inp_data, int width,
}
/*****************************************************************************/
void *APP_CC
void *
xrdp_jpeg_init(void)
{
return 0;
}
/*****************************************************************************/
int APP_CC
int
xrdp_jpeg_deinit(void *handle)
{
return 0;
@ -448,7 +448,7 @@ xrdp_jpeg_deinit(void *handle)
#else
/*****************************************************************************/
int APP_CC
int
xrdp_jpeg_compress(void *handle, char *in_data, int width, int height,
struct stream *s, int bpp, int byte_limit,
int start_line, struct stream *temp_s,
@ -458,7 +458,7 @@ xrdp_jpeg_compress(void *handle, char *in_data, int width, int height,
}
/*****************************************************************************/
int APP_CC
int
xrdp_codec_jpeg_compress(void *handle, int format, char *inp_data, int width,
int height, int stride, int x, int y, int cx, int cy,
int quality, char *out_data, int *io_len)
@ -467,14 +467,14 @@ xrdp_codec_jpeg_compress(void *handle, int format, char *inp_data, int width,
}
/*****************************************************************************/
void *APP_CC
void *
xrdp_jpeg_init(void)
{
return 0;
}
/*****************************************************************************/
int APP_CC
int
xrdp_jpeg_deinit(void *handle)
{
return 0;

View File

@ -26,7 +26,7 @@
#include "log.h"
/*****************************************************************************/
struct xrdp_mcs *APP_CC
struct xrdp_mcs *
xrdp_mcs_create(struct xrdp_sec *owner, struct trans *trans,
struct stream *client_mcs_data,
struct stream *server_mcs_data)
@ -47,7 +47,7 @@ xrdp_mcs_create(struct xrdp_sec *owner, struct trans *trans,
}
/*****************************************************************************/
void APP_CC
void
xrdp_mcs_delete(struct xrdp_mcs *self)
{
struct mcs_channel_item *channel_item;
@ -81,7 +81,7 @@ xrdp_mcs_delete(struct xrdp_mcs *self)
/*****************************************************************************/
/* This function sends channel join confirm */
/* returns error = 1 ok = 0 */
static int APP_CC
static int
xrdp_mcs_send_cjcf(struct xrdp_mcs *self, int userid, int chanid)
{
struct stream *s;
@ -118,7 +118,7 @@ xrdp_mcs_send_cjcf(struct xrdp_mcs *self, int userid, int chanid)
/*****************************************************************************/
/* returns error */
int APP_CC
int
xrdp_mcs_recv(struct xrdp_mcs *self, struct stream *s, int *chan)
{
int appid;
@ -224,7 +224,7 @@ xrdp_mcs_recv(struct xrdp_mcs *self, struct stream *s, int *chan)
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
xrdp_mcs_ber_parse_header(struct xrdp_mcs *self, struct stream *s,
int tag_val, int *len)
{
@ -294,7 +294,7 @@ xrdp_mcs_ber_parse_header(struct xrdp_mcs *self, struct stream *s,
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
xrdp_mcs_parse_domain_params(struct xrdp_mcs *self, struct stream *s)
{
int len;
@ -323,7 +323,7 @@ xrdp_mcs_parse_domain_params(struct xrdp_mcs *self, struct stream *s)
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
xrdp_mcs_recv_connect_initial(struct xrdp_mcs *self)
{
int len;
@ -430,7 +430,7 @@ xrdp_mcs_recv_connect_initial(struct xrdp_mcs *self)
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
xrdp_mcs_recv_edrq(struct xrdp_mcs *self)
{
int opcode;
@ -489,7 +489,7 @@ xrdp_mcs_recv_edrq(struct xrdp_mcs *self)
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
xrdp_mcs_recv_aurq(struct xrdp_mcs *self)
{
int opcode;
@ -540,7 +540,7 @@ xrdp_mcs_recv_aurq(struct xrdp_mcs *self)
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
xrdp_mcs_send_aucf(struct xrdp_mcs *self)
{
struct stream *s;
@ -575,7 +575,7 @@ xrdp_mcs_send_aucf(struct xrdp_mcs *self)
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
xrdp_mcs_recv_cjrq(struct xrdp_mcs *self)
{
int opcode;
@ -630,7 +630,7 @@ xrdp_mcs_recv_cjrq(struct xrdp_mcs *self)
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
xrdp_mcs_ber_out_header(struct xrdp_mcs *self, struct stream *s,
int tag_val, int len)
{
@ -658,7 +658,7 @@ xrdp_mcs_ber_out_header(struct xrdp_mcs *self, struct stream *s,
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
xrdp_mcs_ber_out_int8(struct xrdp_mcs *self, struct stream *s, int value)
{
xrdp_mcs_ber_out_header(self, s, BER_TAG_INTEGER, 1);
@ -669,7 +669,7 @@ xrdp_mcs_ber_out_int8(struct xrdp_mcs *self, struct stream *s, int value)
#if 0 /* not used */
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
xrdp_mcs_ber_out_int16(struct xrdp_mcs *self, struct stream *s, int value)
{
xrdp_mcs_ber_out_header(self, s, BER_TAG_INTEGER, 2);
@ -681,7 +681,7 @@ xrdp_mcs_ber_out_int16(struct xrdp_mcs *self, struct stream *s, int value)
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
xrdp_mcs_ber_out_int24(struct xrdp_mcs *self, struct stream *s, int value)
{
xrdp_mcs_ber_out_header(self, s, BER_TAG_INTEGER, 3);
@ -693,7 +693,7 @@ xrdp_mcs_ber_out_int24(struct xrdp_mcs *self, struct stream *s, int value)
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
xrdp_mcs_out_domain_params(struct xrdp_mcs *self, struct stream *s,
int max_channels,
int max_users, int max_tokens,
@ -712,7 +712,7 @@ xrdp_mcs_out_domain_params(struct xrdp_mcs *self, struct stream *s,
}
/*****************************************************************************/
/* prepare server gcc data to send in mcs response msg */
int APP_CC
int
xrdp_mcs_out_gcc_data(struct xrdp_sec *self)
{
struct stream *s;
@ -869,7 +869,7 @@ xrdp_mcs_out_gcc_data(struct xrdp_sec *self)
}
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
xrdp_mcs_send_connect_response(struct xrdp_mcs *self)
{
int data_len;
@ -907,7 +907,7 @@ xrdp_mcs_send_connect_response(struct xrdp_mcs *self)
/*****************************************************************************/
/* returns error */
int APP_CC
int
xrdp_mcs_incoming(struct xrdp_mcs *self)
{
int index;
@ -970,7 +970,7 @@ xrdp_mcs_incoming(struct xrdp_mcs *self)
/*****************************************************************************/
/* returns error */
int APP_CC
int
xrdp_mcs_init(struct xrdp_mcs *self, struct stream *s)
{
xrdp_iso_init(self->iso_layer, s);
@ -982,7 +982,7 @@ xrdp_mcs_init(struct xrdp_mcs *self, struct stream *s)
/* returns error */
/* Inform the callback that an mcs packet has been sent. This is needed so
the module can send any high priority mcs packets like audio. */
static int APP_CC
static int
xrdp_mcs_call_callback(struct xrdp_mcs *self)
{
int rv;
@ -1014,7 +1014,7 @@ xrdp_mcs_call_callback(struct xrdp_mcs *self)
/*****************************************************************************/
/* returns error */
int APP_CC
int
xrdp_mcs_send(struct xrdp_mcs *self, struct stream *s, int chan)
{
int len;
@ -1083,7 +1083,7 @@ xrdp_mcs_send(struct xrdp_mcs *self, struct stream *s, int chan)
* Internal help function to close the socket
* @param self
*/
void APP_CC
void
close_rdp_socket(struct xrdp_mcs *self)
{
if (self->iso_layer != 0)
@ -1102,7 +1102,7 @@ close_rdp_socket(struct xrdp_mcs *self)
/*****************************************************************************/
/* returns error */
int APP_CC
int
xrdp_mcs_disconnect(struct xrdp_mcs *self)
{
struct stream *s;

View File

@ -431,7 +431,7 @@ do \
* @return struct xrdp_mppc_enc* or nil on failure
*/
struct xrdp_mppc_enc * APP_CC
struct xrdp_mppc_enc *
mppc_enc_new(int protocol_type)
{
struct xrdp_mppc_enc *enc;
@ -498,7 +498,7 @@ mppc_enc_new(int protocol_type)
* @param enc struct to be deinited
*/
void APP_CC
void
mppc_enc_free(struct xrdp_mppc_enc *enc)
{
if (enc == 0)
@ -521,7 +521,7 @@ mppc_enc_free(struct xrdp_mppc_enc *enc)
* @return TRUE on success, FALSE on failure
*/
static int APP_CC
static int
compress_rdp_4(struct xrdp_mppc_enc *enc, tui8 *srcData, int len)
{
/* RDP 4.0 encoding not yet implemented */
@ -538,7 +538,7 @@ compress_rdp_4(struct xrdp_mppc_enc *enc, tui8 *srcData, int len)
* @return TRUE on success, FALSE on failure
*/
static int APP_CC
static int
compress_rdp_5(struct xrdp_mppc_enc *enc, tui8 *srcData, int len)
{
char *outputBuffer; /* points to enc->outputBuffer */
@ -1007,7 +1007,7 @@ compress_rdp_5(struct xrdp_mppc_enc *enc, tui8 *srcData, int len)
* @return TRUE on success, FALSE on failure
*/
int APP_CC
int
compress_rdp(struct xrdp_mppc_enc *enc, tui8 *srcData, int len)
{
if ((enc == 0) || (srcData == 0) || (len <= 0) || (len > enc->buf_len))

View File

@ -41,7 +41,7 @@
#define MAX_ORDERS_SIZE (16 * 1024 - 256)
/*****************************************************************************/
struct xrdp_orders *APP_CC
struct xrdp_orders *
xrdp_orders_create(struct xrdp_session *session, struct xrdp_rdp *rdp_layer)
{
struct xrdp_orders *self;
@ -65,7 +65,7 @@ xrdp_orders_create(struct xrdp_session *session, struct xrdp_rdp *rdp_layer)
}
/*****************************************************************************/
void APP_CC
void
xrdp_orders_delete(struct xrdp_orders *self)
{
if (self == 0)
@ -83,7 +83,7 @@ xrdp_orders_delete(struct xrdp_orders *self)
/*****************************************************************************/
/* set all values to zero */
/* returns error */
int APP_CC
int
xrdp_orders_reset(struct xrdp_orders *self)
{
if (xrdp_orders_force_send(self) != 0)
@ -102,7 +102,7 @@ xrdp_orders_reset(struct xrdp_orders *self)
/*****************************************************************************/
/* returns error */
int APP_CC
int
xrdp_orders_init(struct xrdp_orders *self)
{
self->order_level++;
@ -138,7 +138,7 @@ xrdp_orders_init(struct xrdp_orders *self)
/*****************************************************************************/
/* returns error */
int APP_CC
int
xrdp_orders_send(struct xrdp_orders *self)
{
int rv;
@ -177,7 +177,7 @@ xrdp_orders_send(struct xrdp_orders *self)
/*****************************************************************************/
/* returns error */
int APP_CC
int
xrdp_orders_force_send(struct xrdp_orders *self)
{
if (self == 0)
@ -216,7 +216,7 @@ xrdp_orders_force_send(struct xrdp_orders *self)
/* check if the current order will fit in packet size of 16384, if not */
/* send what we got and init a new one */
/* returns error */
int APP_CC
int
xrdp_orders_check(struct xrdp_orders *self, int max_size)
{
int size;
@ -270,7 +270,7 @@ xrdp_orders_check(struct xrdp_orders *self, int max_size)
/*****************************************************************************/
/* check if rect is the same as the last one sent */
/* returns boolean */
static int APP_CC
static int
xrdp_orders_last_bounds(struct xrdp_orders *self, struct xrdp_rect *rect)
{
if (rect == 0)
@ -292,7 +292,7 @@ xrdp_orders_last_bounds(struct xrdp_orders *self, struct xrdp_rect *rect)
/*****************************************************************************/
/* check if all coords are within 256 bytes */
/* returns boolean */
static int APP_CC
static int
xrdp_orders_send_delta(struct xrdp_orders *self, int *vals, int count)
{
int i;
@ -310,7 +310,7 @@ xrdp_orders_send_delta(struct xrdp_orders *self, int *vals, int count)
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
xrdp_orders_out_bounds(struct xrdp_orders *self, struct xrdp_rect *rect)
{
char *bounds_flags_ptr;
@ -428,7 +428,7 @@ xrdp_orders_out_bounds(struct xrdp_orders *self, struct xrdp_rect *rect)
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
xrdp_order_pack_small_or_tiny(struct xrdp_orders *self,
char *order_flags_ptr, int orders_flags,
char *present_ptr, int present,
@ -485,7 +485,7 @@ xrdp_order_pack_small_or_tiny(struct xrdp_orders *self,
/* returns error */
/* send a solid rect to client */
/* max size 23 */
int APP_CC
int
xrdp_orders_rect(struct xrdp_orders *self, int x, int y, int cx, int cy,
int color, struct xrdp_rect *rect)
{
@ -655,7 +655,7 @@ xrdp_orders_rect(struct xrdp_orders *self, int x, int y, int cx, int cy,
/* returns error */
/* send a screen blt order */
/* max size 25 */
int APP_CC
int
xrdp_orders_screen_blt(struct xrdp_orders *self, int x, int y,
int cx, int cy, int srcx, int srcy,
int rop, struct xrdp_rect *rect)
@ -845,7 +845,7 @@ xrdp_orders_screen_blt(struct xrdp_orders *self, int x, int y,
/* returns error */
/* send a pat blt order */
/* max size 39 */
int APP_CC
int
xrdp_orders_pat_blt(struct xrdp_orders *self, int x, int y,
int cx, int cy, int rop, int bg_color,
int fg_color, struct xrdp_brush *brush,
@ -1064,7 +1064,7 @@ xrdp_orders_pat_blt(struct xrdp_orders *self, int x, int y,
/* returns error */
/* send a dest blt order */
/* max size 21 */
int APP_CC
int
xrdp_orders_dest_blt(struct xrdp_orders *self, int x, int y,
int cx, int cy, int rop,
struct xrdp_rect *rect)
@ -1218,7 +1218,7 @@ xrdp_orders_dest_blt(struct xrdp_orders *self, int x, int y,
/* returns error */
/* send a line order */
/* max size 32 */
int APP_CC
int
xrdp_orders_line(struct xrdp_orders *self, int mix_mode,
int startx, int starty,
int endx, int endy, int rop, int bg_color,
@ -1436,7 +1436,7 @@ xrdp_orders_line(struct xrdp_orders *self, int mix_mode,
/* returns error */
/* send a mem blt order */
/* max size 30 */
int APP_CC
int
xrdp_orders_mem_blt(struct xrdp_orders *self, int cache_id,
int color_table, int x, int y, int cx, int cy,
int rop, int srcx, int srcy,
@ -1642,7 +1642,7 @@ xrdp_orders_mem_blt(struct xrdp_orders *self, int cache_id,
/*****************************************************************************/
/* returns error */
int APP_CC
int
xrdp_orders_composite_blt(struct xrdp_orders* self, int srcidx, int srcformat,
int srcwidth, int srcrepeat, int* srctransform,
int mskflags, int mskidx, int mskformat,
@ -1971,7 +1971,7 @@ xrdp_orders_composite_blt(struct xrdp_orders* self, int srcidx, int srcformat,
/*****************************************************************************/
/* returns error */
int APP_CC
int
xrdp_orders_text(struct xrdp_orders *self,
int font, int flags, int mixmode,
int fg_color, int bg_color,
@ -2168,7 +2168,7 @@ xrdp_orders_text(struct xrdp_orders *self,
/*****************************************************************************/
/* returns error */
/* when a palette gets sent, send the main palette too */
int APP_CC
int
xrdp_orders_send_palette(struct xrdp_orders *self, int *palette,
int cache_id)
{
@ -2204,7 +2204,7 @@ xrdp_orders_send_palette(struct xrdp_orders *self, int *palette,
/*****************************************************************************/
/* returns error */
/* max size width * height * Bpp + 16 */
int APP_CC
int
xrdp_orders_send_raw_bitmap(struct xrdp_orders *self,
int width, int height, int bpp, char *data,
int cache_id, int cache_idx)
@ -2324,7 +2324,7 @@ xrdp_orders_send_raw_bitmap(struct xrdp_orders *self,
/*****************************************************************************/
/* returns error */
/* max size width * height * Bpp + 16 */
int APP_CC
int
xrdp_orders_send_bitmap(struct xrdp_orders *self,
int width, int height, int bpp, char *data,
int cache_id, int cache_idx)
@ -2432,7 +2432,7 @@ xrdp_orders_send_bitmap(struct xrdp_orders *self,
/* returns error */
/* max size datasize + 18*/
/* todo, only sends one for now */
int APP_CC
int
xrdp_orders_send_font(struct xrdp_orders *self,
struct xrdp_font_char *font_char,
int font_index, int char_index)
@ -2477,7 +2477,7 @@ xrdp_orders_send_font(struct xrdp_orders *self,
/*****************************************************************************/
/* returns error */
/* max size width * height * Bpp + 14 */
int APP_CC
int
xrdp_orders_send_raw_bitmap2(struct xrdp_orders *self,
int width, int height, int bpp, char *data,
int cache_id, int cache_idx)
@ -2599,7 +2599,7 @@ xrdp_orders_send_raw_bitmap2(struct xrdp_orders *self,
/*****************************************************************************/
/* returns error */
/* max size width * height * Bpp + 14 */
int APP_CC
int
xrdp_orders_send_bitmap2(struct xrdp_orders *self,
int width, int height, int bpp, char *data,
int cache_id, int cache_idx, int hints)
@ -2712,7 +2712,7 @@ xrdp_orders_send_as_jpeg(struct xrdp_orders *self,
#if defined(XRDP_NEUTRINORDP)
/*****************************************************************************/
/* secondary drawing order (bitmap v3) using remotefx compression */
static int APP_CC
static int
xrdp_orders_send_as_rfx(struct xrdp_orders *self,
int width, int height, int bpp,
int hints)
@ -2740,7 +2740,7 @@ xrdp_orders_send_as_rfx(struct xrdp_orders *self,
#if defined(XRDP_JPEG) || defined(XRDP_NEUTRINORDP)
/*****************************************************************************/
static int APP_CC
static int
xrdp_orders_out_v3(struct xrdp_orders *self, int cache_id, int cache_idx,
char *buf, int bufsize, int width, int height, int bpp,
int codec_id)
@ -2783,7 +2783,7 @@ xrdp_orders_out_v3(struct xrdp_orders *self, int cache_id, int cache_idx,
/*****************************************************************************/
/* secondary drawing order (bitmap v3) using remotefx compression */
int APP_CC
int
xrdp_orders_send_bitmap3(struct xrdp_orders *self,
int width, int height, int bpp, char *data,
int cache_id, int cache_idx, int hints)
@ -2891,7 +2891,7 @@ xrdp_orders_send_bitmap3(struct xrdp_orders *self,
/*****************************************************************************/
/* returns error */
/* send a brush cache entry */
int APP_CC
int
xrdp_orders_send_brush(struct xrdp_orders *self, int width, int height,
int bpp, int type, int size, char *data, int cache_id)
{
@ -2922,7 +2922,7 @@ xrdp_orders_send_brush(struct xrdp_orders *self, int width, int height,
/*****************************************************************************/
/* returns error */
/* send an off screen bitmap entry */
int APP_CC
int
xrdp_orders_send_create_os_surface(struct xrdp_orders *self, int id,
int width, int height,
struct list *del_list)
@ -2981,7 +2981,7 @@ xrdp_orders_send_create_os_surface(struct xrdp_orders *self, int id,
/*****************************************************************************/
/* returns error */
int APP_CC
int
xrdp_orders_send_switch_os_surface(struct xrdp_orders *self, int id)
{
int order_flags;

View File

@ -30,7 +30,7 @@
/*****************************************************************************/
/* RAIL */
/* returns error */
int APP_CC
int
xrdp_orders_send_window_delete(struct xrdp_orders *self, int window_id)
{
int order_size;
@ -61,7 +61,7 @@ xrdp_orders_send_window_delete(struct xrdp_orders *self, int window_id)
/* returns error */
/* flags can contain WINDOW_ORDER_STATE_NEW and/or
WINDOW_ORDER_FIELD_ICON_BIG */
int APP_CC
int
xrdp_orders_send_window_cached_icon(struct xrdp_orders *self,
int window_id, int cache_entry,
int cache_id, int flags)
@ -97,7 +97,7 @@ xrdp_orders_send_window_cached_icon(struct xrdp_orders *self,
/*****************************************************************************/
/* RAIL */
/* returns error */
static int APP_CC
static int
xrdp_orders_send_ts_icon(struct stream *s, int cache_entry, int cache_id,
struct rail_icon_info *icon_info)
{
@ -140,7 +140,7 @@ xrdp_orders_send_ts_icon(struct stream *s, int cache_entry, int cache_id,
/* returns error */
/* flags can contain WINDOW_ORDER_STATE_NEW and/or
WINDOW_ORDER_FIELD_ICON_BIG */
int APP_CC
int
xrdp_orders_send_window_icon(struct xrdp_orders *self,
int window_id, int cache_entry, int cache_id,
struct rail_icon_info *icon_info,
@ -189,7 +189,7 @@ xrdp_orders_send_window_icon(struct xrdp_orders *self,
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
xrdp_orders_send_as_unicode(struct stream *s, const char *text)
{
int str_chars;
@ -222,7 +222,7 @@ xrdp_orders_send_as_unicode(struct stream *s, const char *text)
/* RAIL */
/* returns error */
/* flags can contain WINDOW_ORDER_STATE_NEW */
int APP_CC
int
xrdp_orders_send_window_new_update(struct xrdp_orders *self, int window_id,
struct rail_window_state_order *window_state,
int flags)
@ -478,7 +478,7 @@ xrdp_orders_send_window_new_update(struct xrdp_orders *self, int window_id,
/*****************************************************************************/
/* RAIL */
/* returns error */
int APP_CC
int
xrdp_orders_send_notify_delete(struct xrdp_orders *self, int window_id,
int notify_id)
{
@ -511,7 +511,7 @@ xrdp_orders_send_notify_delete(struct xrdp_orders *self, int window_id,
/* RAIL */
/* returns error */
/* flags can contain WINDOW_ORDER_STATE_NEW */
int APP_CC
int
xrdp_orders_send_notify_new_update(struct xrdp_orders *self,
int window_id, int notify_id,
struct rail_notify_state_order *notify_state,
@ -652,7 +652,7 @@ xrdp_orders_send_notify_new_update(struct xrdp_orders *self,
/* RAIL */
/* returns error */
/* used for both Non-Monitored Desktop and Actively Monitored Desktop */
int APP_CC
int
xrdp_orders_send_monitored_desktop(struct xrdp_orders *self,
struct rail_monitored_desktop_order *mdo,
int flags)

View File

@ -19,30 +19,30 @@
#if !defined(_XRDP_ORDERS_RAIL_H)
#define _XRDP_ORDERS_RAIL_H
int APP_CC
int
xrdp_orders_send_window_delete(struct xrdp_orders *self, int window_id);
int APP_CC
int
xrdp_orders_send_window_cached_icon(struct xrdp_orders *self,
int window_id, int cache_entry,
int cache_id, int flags);
int APP_CC
int
xrdp_orders_send_window_icon(struct xrdp_orders *self,
int window_id, int cache_entry, int cache_id,
struct rail_icon_info *icon_info,
int flags);
int APP_CC
int
xrdp_orders_send_window_new_update(struct xrdp_orders *self, int window_id,
struct rail_window_state_order *window_state,
int flags);
int APP_CC
int
xrdp_orders_send_notify_delete(struct xrdp_orders *self, int window_id,
int notify_id);
int APP_CC
int
xrdp_orders_send_notify_new_update(struct xrdp_orders *self,
int window_id, int notify_id,
struct rail_notify_state_order *notify_state,
int flags);
int APP_CC
int
xrdp_orders_send_monitored_desktop(struct xrdp_orders *self,
struct rail_monitored_desktop_order *mdo,
int flags);

View File

@ -40,7 +40,7 @@
#define FASTPATH_FRAG_SIZE (16 * 1024 - 128)
/*****************************************************************************/
static int APP_CC
static int
xrdp_rdp_read_config(struct xrdp_client_info *client_info)
{
int index = 0;
@ -357,7 +357,7 @@ xrdp_rdp_detect_cpu(void)
#endif
/*****************************************************************************/
struct xrdp_rdp *APP_CC
struct xrdp_rdp *
xrdp_rdp_create(struct xrdp_session *session, struct trans *trans)
{
struct xrdp_rdp *self = (struct xrdp_rdp *)NULL;
@ -392,7 +392,7 @@ xrdp_rdp_create(struct xrdp_session *session, struct trans *trans)
}
/*****************************************************************************/
void APP_CC
void
xrdp_rdp_delete(struct xrdp_rdp *self)
{
if (self == 0)
@ -409,7 +409,7 @@ xrdp_rdp_delete(struct xrdp_rdp *self)
}
/*****************************************************************************/
int APP_CC
int
xrdp_rdp_init(struct xrdp_rdp *self, struct stream *s)
{
if (xrdp_sec_init(self->sec_layer, s) != 0)
@ -422,7 +422,7 @@ xrdp_rdp_init(struct xrdp_rdp *self, struct stream *s)
}
/*****************************************************************************/
int APP_CC
int
xrdp_rdp_init_data(struct xrdp_rdp *self, struct stream *s)
{
if (xrdp_sec_init(self->sec_layer, s) != 0)
@ -436,7 +436,7 @@ xrdp_rdp_init_data(struct xrdp_rdp *self, struct stream *s)
/*****************************************************************************/
/* returns error */
int APP_CC
int
xrdp_rdp_recv(struct xrdp_rdp *self, struct stream *s, int *code)
{
int error = 0;
@ -535,7 +535,7 @@ xrdp_rdp_recv(struct xrdp_rdp *self, struct stream *s, int *code)
}
/*****************************************************************************/
int APP_CC
int
xrdp_rdp_send(struct xrdp_rdp *self, struct stream *s, int pdu_type)
{
int len = 0;
@ -558,7 +558,7 @@ xrdp_rdp_send(struct xrdp_rdp *self, struct stream *s, int pdu_type)
}
/*****************************************************************************/
int APP_CC
int
xrdp_rdp_send_data(struct xrdp_rdp *self, struct stream *s,
int data_pdu_type)
{
@ -647,7 +647,7 @@ xrdp_rdp_send_data(struct xrdp_rdp *self, struct stream *s,
/*****************************************************************************/
/* returns the fastpath rdp byte count */
int APP_CC
int
xrdp_rdp_get_fastpath_bytes(struct xrdp_rdp *self)
{
if (self->client_info.rdp_compression)
@ -658,7 +658,7 @@ xrdp_rdp_get_fastpath_bytes(struct xrdp_rdp *self)
}
/*****************************************************************************/
int APP_CC
int
xrdp_rdp_init_fastpath(struct xrdp_rdp *self, struct stream *s)
{
if (xrdp_sec_init_fastpath(self->sec_layer, s) != 0)
@ -680,7 +680,7 @@ xrdp_rdp_init_fastpath(struct xrdp_rdp *self, struct stream *s)
/* returns error */
/* 2.2.9.1.2.1 Fast-Path Update (TS_FP_UPDATE)
* http://msdn.microsoft.com/en-us/library/cc240622.aspx */
int APP_CC
int
xrdp_rdp_send_fastpath(struct xrdp_rdp *self, struct stream *s,
int data_pdu_type)
{
@ -805,7 +805,7 @@ xrdp_rdp_send_fastpath(struct xrdp_rdp *self, struct stream *s,
}
/*****************************************************************************/
int APP_CC
int
xrdp_rdp_send_data_update_sync(struct xrdp_rdp *self)
{
struct stream *s = (struct stream *)NULL;
@ -863,7 +863,7 @@ xrdp_rdp_send_data_update_sync(struct xrdp_rdp *self)
}
/*****************************************************************************/
int APP_CC
int
xrdp_rdp_incoming(struct xrdp_rdp *self)
{
struct xrdp_iso *iso;
@ -907,7 +907,7 @@ xrdp_rdp_incoming(struct xrdp_rdp *self)
}
/*****************************************************************************/
static int APP_CC
static int
xrdp_rdp_process_data_pointer(struct xrdp_rdp *self, struct stream *s)
{
return 0;
@ -915,7 +915,7 @@ xrdp_rdp_process_data_pointer(struct xrdp_rdp *self, struct stream *s)
/*****************************************************************************/
/* RDP_DATA_PDU_INPUT */
static int APP_CC
static int
xrdp_rdp_process_data_input(struct xrdp_rdp *self, struct stream *s)
{
int num_events;
@ -966,7 +966,7 @@ xrdp_rdp_process_data_input(struct xrdp_rdp *self, struct stream *s)
}
/*****************************************************************************/
static int APP_CC
static int
xrdp_rdp_send_synchronise(struct xrdp_rdp *self)
{
struct stream *s;
@ -995,7 +995,7 @@ xrdp_rdp_send_synchronise(struct xrdp_rdp *self)
}
/*****************************************************************************/
static int APP_CC
static int
xrdp_rdp_send_control(struct xrdp_rdp *self, int action)
{
struct stream *s;
@ -1025,7 +1025,7 @@ xrdp_rdp_send_control(struct xrdp_rdp *self, int action)
}
/*****************************************************************************/
static int APP_CC
static int
xrdp_rdp_process_data_control(struct xrdp_rdp *self, struct stream *s)
{
int action;
@ -1054,7 +1054,7 @@ xrdp_rdp_process_data_control(struct xrdp_rdp *self, struct stream *s)
}
/*****************************************************************************/
static int APP_CC
static int
xrdp_rdp_process_data_sync(struct xrdp_rdp *self)
{
DEBUG(("xrdp_rdp_process_data_sync"));
@ -1062,7 +1062,7 @@ xrdp_rdp_process_data_sync(struct xrdp_rdp *self)
}
/*****************************************************************************/
static int APP_CC
static int
xrdp_rdp_process_screen_update(struct xrdp_rdp *self, struct stream *s)
{
int left;
@ -1089,7 +1089,7 @@ xrdp_rdp_process_screen_update(struct xrdp_rdp *self, struct stream *s)
}
/*****************************************************************************/
static int APP_CC
static int
xrdp_rdp_send_fontmap(struct xrdp_rdp *self)
{
struct stream *s;
@ -1121,7 +1121,7 @@ xrdp_rdp_send_fontmap(struct xrdp_rdp *self)
}
/*****************************************************************************/
static int APP_CC
static int
xrdp_rdp_process_data_font(struct xrdp_rdp *self, struct stream *s)
{
int seq;
@ -1151,7 +1151,7 @@ xrdp_rdp_process_data_font(struct xrdp_rdp *self, struct stream *s)
/*****************************************************************************/
/* sent 37 pdu */
static int APP_CC
static int
xrdp_rdp_send_disconnect_query_response(struct xrdp_rdp *self)
{
struct stream *s;
@ -1180,7 +1180,7 @@ xrdp_rdp_send_disconnect_query_response(struct xrdp_rdp *self)
#if 0 /* not used */
/*****************************************************************************/
/* sent RDP_DATA_PDU_DISCONNECT 47 pdu */
static int APP_CC
static int
xrdp_rdp_send_disconnect_reason(struct xrdp_rdp *self, int reason)
{
struct stream *s;
@ -1209,7 +1209,7 @@ xrdp_rdp_send_disconnect_reason(struct xrdp_rdp *self, int reason)
#endif
/*****************************************************************************/
static int APP_CC
static int
xrdp_rdp_process_frame_ack(struct xrdp_rdp *self, struct stream *s)
{
int frame_id;
@ -1228,7 +1228,7 @@ xrdp_rdp_process_frame_ack(struct xrdp_rdp *self, struct stream *s)
/*****************************************************************************/
/* RDP_PDU_DATA */
int APP_CC
int
xrdp_rdp_process_data(struct xrdp_rdp *self, struct stream *s)
{
int data_type;
@ -1283,7 +1283,7 @@ xrdp_rdp_process_data(struct xrdp_rdp *self, struct stream *s)
return 0;
}
/*****************************************************************************/
int APP_CC
int
xrdp_rdp_disconnect(struct xrdp_rdp *self)
{
int rv;
@ -1295,7 +1295,7 @@ xrdp_rdp_disconnect(struct xrdp_rdp *self)
}
/*****************************************************************************/
int APP_CC
int
xrdp_rdp_send_deactivate(struct xrdp_rdp *self)
{
struct stream *s;
@ -1326,7 +1326,7 @@ xrdp_rdp_send_deactivate(struct xrdp_rdp *self)
}
/*****************************************************************************/
int APP_CC
int
xrdp_rdp_send_session_info(struct xrdp_rdp *self, const char *data,
int data_bytes)
{

View File

@ -190,7 +190,7 @@ static const tui8 g_fips_ivec[8] =
};
/*****************************************************************************/
static void APP_CC
static void
hex_str_to_bin(char *in, char *out, int out_len)
{
int in_index;
@ -225,7 +225,7 @@ hex_str_to_bin(char *in, char *out, int out_len)
}
/*****************************************************************************/
static void APP_CC
static void
xrdp_load_keyboard_layout(struct xrdp_client_info *client_info)
{
int fd;
@ -440,7 +440,7 @@ xrdp_load_keyboard_layout(struct xrdp_client_info *client_info)
}
/*****************************************************************************/
struct xrdp_sec *APP_CC
struct xrdp_sec *
xrdp_sec_create(struct xrdp_rdp *owner, struct trans *trans)
{
struct xrdp_sec *self;
@ -461,7 +461,7 @@ xrdp_sec_create(struct xrdp_rdp *owner, struct trans *trans)
}
/*****************************************************************************/
void APP_CC
void
xrdp_sec_delete(struct xrdp_sec *self)
{
if (self == 0)
@ -487,7 +487,7 @@ xrdp_sec_delete(struct xrdp_sec *self)
/*****************************************************************************/
/* returns error */
int APP_CC
int
xrdp_sec_init(struct xrdp_sec *self, struct stream *s)
{
if (xrdp_mcs_init(self->mcs_layer, s) != 0)
@ -516,7 +516,7 @@ xrdp_sec_init(struct xrdp_sec *self, struct stream *s)
/*****************************************************************************/
/* Reduce key entropy from 64 to 40 bits */
static void APP_CC
static void
xrdp_sec_make_40bit(char *key)
{
key[0] = 0xd1;
@ -527,7 +527,7 @@ xrdp_sec_make_40bit(char *key)
/*****************************************************************************/
/* returns error */
/* update an encryption key */
static int APP_CC
static int
xrdp_sec_update(char *key, char *update_key, int key_len)
{
char shasig[20];
@ -563,7 +563,7 @@ xrdp_sec_update(char *key, char *update_key, int key_len)
}
/*****************************************************************************/
static void APP_CC
static void
xrdp_sec_fips_decrypt(struct xrdp_sec *self, char *data, int len)
{
LLOGLN(10, ("xrdp_sec_fips_decrypt:"));
@ -572,7 +572,7 @@ xrdp_sec_fips_decrypt(struct xrdp_sec *self, char *data, int len)
}
/*****************************************************************************/
static void APP_CC
static void
xrdp_sec_decrypt(struct xrdp_sec *self, char *data, int len)
{
LLOGLN(10, ("xrdp_sec_decrypt:"));
@ -589,7 +589,7 @@ xrdp_sec_decrypt(struct xrdp_sec *self, char *data, int len)
}
/*****************************************************************************/
static void APP_CC
static void
xrdp_sec_fips_encrypt(struct xrdp_sec *self, char *data, int len)
{
LLOGLN(10, ("xrdp_sec_fips_encrypt:"));
@ -598,7 +598,7 @@ xrdp_sec_fips_encrypt(struct xrdp_sec *self, char *data, int len)
}
/*****************************************************************************/
static void APP_CC
static void
xrdp_sec_encrypt(struct xrdp_sec *self, char *data, int len)
{
LLOGLN(10, ("xrdp_sec_encrypt:"));
@ -616,7 +616,7 @@ xrdp_sec_encrypt(struct xrdp_sec *self, char *data, int len)
}
/*****************************************************************************/
static int APP_CC
static int
unicode_in(struct stream *s, int uni_len, char *dst, int dst_len)
{
int dst_index;
@ -652,7 +652,7 @@ unicode_in(struct stream *s, int uni_len, char *dst, int dst_len)
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
xrdp_sec_process_logon_info(struct xrdp_sec *self, struct stream *s)
{
int flags = 0;
@ -865,7 +865,7 @@ xrdp_sec_process_logon_info(struct xrdp_sec *self, struct stream *s)
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
xrdp_sec_send_lic_initial(struct xrdp_sec *self)
{
struct stream *s;
@ -895,7 +895,7 @@ xrdp_sec_send_lic_initial(struct xrdp_sec *self)
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
xrdp_sec_send_lic_response(struct xrdp_sec *self)
{
struct stream *s;
@ -924,7 +924,7 @@ xrdp_sec_send_lic_response(struct xrdp_sec *self)
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
xrdp_sec_send_media_lic_response(struct xrdp_sec *self)
{
struct stream *s;
@ -952,7 +952,7 @@ xrdp_sec_send_media_lic_response(struct xrdp_sec *self)
}
/*****************************************************************************/
static void APP_CC
static void
xrdp_sec_rsa_op(struct xrdp_sec *self, char *out, char *in, int in_bytes,
char *mod, char *exp)
{
@ -962,7 +962,7 @@ xrdp_sec_rsa_op(struct xrdp_sec *self, char *out, char *in, int in_bytes,
}
/*****************************************************************************/
static void APP_CC
static void
xrdp_sec_hash_48(char *out, char *in, char *salt1, char *salt2, int salt)
{
int i;
@ -996,7 +996,7 @@ xrdp_sec_hash_48(char *out, char *in, char *salt1, char *salt2, int salt)
}
/*****************************************************************************/
static void APP_CC
static void
xrdp_sec_hash_16(char *out, char *in, char *salt1, char *salt2)
{
void *md5_info;
@ -1011,7 +1011,7 @@ xrdp_sec_hash_16(char *out, char *in, char *salt1, char *salt2)
}
/*****************************************************************************/
static void APP_CC
static void
fips_expand_key_bits(const char *in, char *out)
{
tui8 buf[32];
@ -1055,7 +1055,7 @@ fips_expand_key_bits(const char *in, char *out)
}
/****************************************************************************/
static void APP_CC
static void
xrdp_sec_fips_establish_keys(struct xrdp_sec *self)
{
char server_encrypt_key[32];
@ -1100,7 +1100,7 @@ xrdp_sec_fips_establish_keys(struct xrdp_sec *self)
}
/****************************************************************************/
static void APP_CC
static void
xrdp_sec_establish_keys(struct xrdp_sec *self)
{
char session_key[48];
@ -1141,7 +1141,7 @@ xrdp_sec_establish_keys(struct xrdp_sec *self)
/*****************************************************************************/
/* returns error */
int APP_CC
int
xrdp_sec_recv_fastpath(struct xrdp_sec *self, struct stream *s)
{
int ver;
@ -1203,7 +1203,7 @@ xrdp_sec_recv_fastpath(struct xrdp_sec *self, struct stream *s)
}
/*****************************************************************************/
/* returns error */
int APP_CC
int
xrdp_sec_recv(struct xrdp_sec *self, struct stream *s, int *chan)
{
int flags;
@ -1368,7 +1368,7 @@ buf_out_uint32(char *buffer, int value)
/*****************************************************************************/
/* Generate a MAC hash (5.2.3.1), using a combination of SHA1 and MD5 */
static void APP_CC
static void
xrdp_sec_fips_sign(struct xrdp_sec *self, char *out, int out_len,
char *data, int data_len)
{
@ -1385,7 +1385,7 @@ xrdp_sec_fips_sign(struct xrdp_sec *self, char *out, int out_len,
/*****************************************************************************/
/* Generate a MAC hash (5.2.3.1), using a combination of SHA1 and MD5 */
static void APP_CC
static void
xrdp_sec_sign(struct xrdp_sec *self, char *out, int out_len,
char *data, int data_len)
{
@ -1416,7 +1416,7 @@ xrdp_sec_sign(struct xrdp_sec *self, char *out, int out_len,
/*****************************************************************************/
/* returns error */
int APP_CC
int
xrdp_sec_send(struct xrdp_sec *self, struct stream *s, int chan)
{
int datalen;
@ -1466,7 +1466,7 @@ xrdp_sec_send(struct xrdp_sec *self, struct stream *s, int chan)
/*****************************************************************************/
/* returns the fastpath sec byte count */
int APP_CC
int
xrdp_sec_get_fastpath_bytes(struct xrdp_sec *self)
{
if (self->crypt_level == CRYPT_LEVEL_FIPS)
@ -1482,7 +1482,7 @@ xrdp_sec_get_fastpath_bytes(struct xrdp_sec *self)
/*****************************************************************************/
/* returns error */
int APP_CC
int
xrdp_sec_init_fastpath(struct xrdp_sec *self, struct stream *s)
{
if (xrdp_fastpath_init(self->fastpath_layer, s) != 0)
@ -1508,7 +1508,7 @@ xrdp_sec_init_fastpath(struct xrdp_sec *self, struct stream *s)
/* returns error */
/* 2.2.9.1.2 Server Fast-Path Update PDU (TS_FP_UPDATE_PDU)
* http://msdn.microsoft.com/en-us/library/cc240621.aspx */
int APP_CC
int
xrdp_sec_send_fastpath(struct xrdp_sec *self, struct stream *s)
{
int secFlags;
@ -1581,7 +1581,7 @@ xrdp_sec_send_fastpath(struct xrdp_sec *self, struct stream *s)
/*****************************************************************************/
/* http://msdn.microsoft.com/en-us/library/cc240510.aspx
2.2.1.3.2 Client Core Data (TS_UD_CS_CORE) */
static int APP_CC
static int
xrdp_sec_process_mcs_data_CS_CORE(struct xrdp_sec* self, struct stream* s)
{
int colorDepth;
@ -1724,7 +1724,7 @@ xrdp_sec_process_mcs_data_CS_CORE(struct xrdp_sec* self, struct stream* s)
}
/*****************************************************************************/
static int APP_CC
static int
xrdp_sec_process_mcs_data_CS_SECURITY(struct xrdp_sec *self, struct stream* s)
{
int crypt_method;
@ -1823,7 +1823,7 @@ xrdp_sec_process_mcs_data_CS_SECURITY(struct xrdp_sec *self, struct stream* s)
/*****************************************************************************/
/* this adds the mcs channels in the list of channels to be used when
creating the server mcs data */
static int APP_CC
static int
xrdp_sec_process_mcs_data_channels(struct xrdp_sec *self, struct stream *s)
{
int num_channels;
@ -1884,7 +1884,7 @@ xrdp_sec_process_mcs_data_channels(struct xrdp_sec *self, struct stream *s)
/*****************************************************************************/
/* reads the client monitors data */
static int APP_CC
static int
xrdp_sec_process_mcs_data_monitors(struct xrdp_sec *self, struct stream *s)
{
int index;
@ -2014,7 +2014,7 @@ xrdp_sec_process_mcs_data_monitors(struct xrdp_sec *self, struct stream *s)
/*****************************************************************************/
/* process client mcs data, we need some things in here to create the server
mcs data */
int APP_CC
int
xrdp_sec_process_mcs_data(struct xrdp_sec *self)
{
struct stream *s = (struct stream *)NULL;
@ -2112,7 +2112,7 @@ xrdp_sec_process_mcs_data(struct xrdp_sec *self)
/*****************************************************************************/
/* process the mcs client data we received from the mcs layer */
static int APP_CC
static int
xrdp_sec_in_mcs_data(struct xrdp_sec *self)
{
struct stream *s = (struct stream *)NULL;
@ -2176,7 +2176,7 @@ xrdp_sec_in_mcs_data(struct xrdp_sec *self)
/*****************************************************************************/
/* returns error */
int APP_CC
int
xrdp_sec_init_rdp_security(struct xrdp_sec *self)
{
switch (self->rdp_layer->client_info.crypt_level)
@ -2228,7 +2228,7 @@ xrdp_sec_init_rdp_security(struct xrdp_sec *self)
}
/*****************************************************************************/
int APP_CC
int
xrdp_sec_incoming(struct xrdp_sec *self)
{
struct list *items = NULL;
@ -2364,7 +2364,7 @@ xrdp_sec_incoming(struct xrdp_sec *self)
}
/*****************************************************************************/
int APP_CC
int
xrdp_sec_disconnect(struct xrdp_sec *self)
{
int rv;

View File

@ -25,7 +25,7 @@
#include "freerdp/codec/rfx.h"
/*****************************************************************************/
struct xrdp_surface *APP_CC
struct xrdp_surface *
xrdp_surface_create(struct xrdp_session *session, struct xrdp_fastpath *fastpath)
{
struct xrdp_surface *self;
@ -39,7 +39,7 @@ xrdp_surface_create(struct xrdp_session *session, struct xrdp_fastpath *fastpath
}
/*****************************************************************************/
void APP_CC
void
xrdp_surface_delete(struct xrdp_surface *self)
{
STREAM *s;
@ -60,14 +60,14 @@ xrdp_surface_delete(struct xrdp_surface *self)
/*****************************************************************************/
/* returns error */
int APP_CC
int
xrdp_surface_reset(struct xrdp_surface *self)
{
return 0;
}
/*****************************************************************************/
int APP_CC
int
xrdp_surface_init(struct xrdp_surface *self)
{
int width;
@ -89,7 +89,7 @@ xrdp_surface_init(struct xrdp_surface *self)
}
/*****************************************************************************/
int APP_CC
int
xrdp_surface_send_surface_bits(struct xrdp_surface *self, int bpp, char *data,
int x, int y, int cx, int cy)
{
@ -153,7 +153,7 @@ xrdp_surface_send_surface_bits(struct xrdp_surface *self, int bpp, char *data,
}
/*****************************************************************************/
int APP_CC
int
xrdp_surface_send_frame_marker(struct xrdp_surface *self,
uint16 frameAction, uint32 frameId)
{

12
mc/mc.c
View File

@ -26,7 +26,7 @@
/*****************************************************************************/
/* return error */
int DEFAULT_CC
int
lib_mod_start(struct mod *mod, int w, int h, int bpp)
{
LIB_DEBUG(mod, "in lib_mod_start");
@ -39,7 +39,7 @@ lib_mod_start(struct mod *mod, int w, int h, int bpp)
/******************************************************************************/
/* return error */
int DEFAULT_CC
int
lib_mod_connect(struct mod *mod)
{
LIB_DEBUG(mod, "in lib_mod_connect");
@ -49,7 +49,7 @@ lib_mod_connect(struct mod *mod)
/******************************************************************************/
/* return error */
int DEFAULT_CC
int
lib_mod_event(struct mod *mod, int msg, long param1, long param2,
long param3, long param4)
{
@ -60,7 +60,7 @@ lib_mod_event(struct mod *mod, int msg, long param1, long param2,
/******************************************************************************/
/* return error */
int DEFAULT_CC
int
lib_mod_signal(struct mod *mod)
{
LIB_DEBUG(mod, "in lib_mod_signal");
@ -70,7 +70,7 @@ lib_mod_signal(struct mod *mod)
/******************************************************************************/
/* return error */
int DEFAULT_CC
int
lib_mod_end(struct mod *mod)
{
return 0;
@ -78,7 +78,7 @@ lib_mod_end(struct mod *mod)
/******************************************************************************/
/* return error */
int DEFAULT_CC
int
lib_mod_set_param(struct mod *mod, const char *name, const char *value)
{
return 0;

View File

@ -23,7 +23,7 @@
#include "xrdp-neutrinordp.h"
char *APP_CC
char *
convert_bitmap(int in_bpp, int out_bpp, char *bmpdata,
int width, int height, int *palette)
{
@ -246,7 +246,7 @@ convert_bitmap(int in_bpp, int out_bpp, char *bmpdata,
/*****************************************************************************/
/* returns color or 0 */
int APP_CC
int
convert_color(int in_bpp, int out_bpp, int in_color, int *palette)
{
int pixel;

View File

@ -20,10 +20,10 @@
#ifndef __XRDP_COLOR_H
#define __XRDP_COLOR_H
char *APP_CC
char *
convert_bitmap(int in_bpp, int out_bpp, char *bmpdata,
int width, int height, int *palette);
int APP_CC
int
convert_color(int in_bpp, int out_bpp, int in_color, int *palette);
#endif

View File

@ -64,7 +64,7 @@ verifyColorMap(struct mod *mod)
/*****************************************************************************/
/* return error */
static int DEFAULT_CC
static int
lxrdp_start(struct mod *mod, int w, int h, int bpp)
{
rdpSettings *settings;
@ -86,7 +86,7 @@ lxrdp_start(struct mod *mod, int w, int h, int bpp)
/******************************************************************************/
/* return error */
static int DEFAULT_CC
static int
lxrdp_connect(struct mod *mod)
{
boolean ok;
@ -193,7 +193,7 @@ lxrdp_connect(struct mod *mod)
/******************************************************************************/
/* return error */
static int DEFAULT_CC
static int
lxrdp_event(struct mod *mod, int msg, long param1, long param2,
long param3, long param4)
{
@ -393,7 +393,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
/******************************************************************************/
/* return error */
static int DEFAULT_CC
static int
lxrdp_signal(struct mod *mod)
{
LLOGLN(10, ("lxrdp_signal:"));
@ -402,7 +402,7 @@ lxrdp_signal(struct mod *mod)
/******************************************************************************/
/* return error */
static int DEFAULT_CC
static int
lxrdp_end(struct mod *mod)
{
int i;
@ -430,7 +430,7 @@ lxrdp_end(struct mod *mod)
/******************************************************************************/
/* return error */
static int DEFAULT_CC
static int
lxrdp_set_param(struct mod *mod, const char *name, const char *value)
{
rdpSettings *settings;
@ -493,7 +493,7 @@ lxrdp_set_param(struct mod *mod, const char *name, const char *value)
}
/******************************************************************************/
static int DEFAULT_CC
static int
lxrdp_session_change(struct mod *mod, int a, int b)
{
LLOGLN(0, ("lxrdp_session_change: - no code here"));
@ -501,7 +501,7 @@ lxrdp_session_change(struct mod *mod, int a, int b)
}
/******************************************************************************/
static int DEFAULT_CC
static int
lxrdp_get_wait_objs(struct mod *mod, tbus *read_objs, int *rcount,
tbus *write_objs, int *wcount, int *timeout)
{
@ -524,7 +524,7 @@ lxrdp_get_wait_objs(struct mod *mod, tbus *read_objs, int *rcount,
}
/******************************************************************************/
static int DEFAULT_CC
static int
lxrdp_check_wait_objs(struct mod *mod)
{
boolean ok;
@ -542,7 +542,7 @@ lxrdp_check_wait_objs(struct mod *mod)
}
/******************************************************************************/
static void DEFAULT_CC
static void
lfreerdp_begin_paint(rdpContext *context)
{
struct mod *mod;
@ -553,7 +553,7 @@ lfreerdp_begin_paint(rdpContext *context)
}
/******************************************************************************/
static void DEFAULT_CC
static void
lfreerdp_end_paint(rdpContext *context)
{
struct mod *mod;
@ -564,7 +564,7 @@ lfreerdp_end_paint(rdpContext *context)
}
/******************************************************************************/
static void DEFAULT_CC
static void
lfreerdp_set_bounds(rdpContext *context, rdpBounds *bounds)
{
struct mod *mod;
@ -591,7 +591,7 @@ lfreerdp_set_bounds(rdpContext *context, rdpBounds *bounds)
}
/******************************************************************************/
static void DEFAULT_CC
static void
lfreerdp_bitmap_update(rdpContext *context, BITMAP_UPDATE *bitmap)
{
struct mod *mod;
@ -664,7 +664,7 @@ lfreerdp_bitmap_update(rdpContext *context, BITMAP_UPDATE *bitmap)
}
/******************************************************************************/
static void DEFAULT_CC
static void
lfreerdp_dst_blt(rdpContext *context, DSTBLT_ORDER *dstblt)
{
struct mod *mod;
@ -678,7 +678,7 @@ lfreerdp_dst_blt(rdpContext *context, DSTBLT_ORDER *dstblt)
}
/******************************************************************************/
static void DEFAULT_CC
static void
lfreerdp_pat_blt(rdpContext *context, PATBLT_ORDER *patblt)
{
struct mod *mod;
@ -745,7 +745,7 @@ lfreerdp_pat_blt(rdpContext *context, PATBLT_ORDER *patblt)
}
/******************************************************************************/
static void DEFAULT_CC
static void
lfreerdp_scr_blt(rdpContext *context, SCRBLT_ORDER *scrblt)
{
struct mod *mod;
@ -760,7 +760,7 @@ lfreerdp_scr_blt(rdpContext *context, SCRBLT_ORDER *scrblt)
}
/******************************************************************************/
static void DEFAULT_CC
static void
lfreerdp_opaque_rect(rdpContext *context, OPAQUE_RECT_ORDER *opaque_rect)
{
struct mod *mod;
@ -784,7 +784,7 @@ lfreerdp_opaque_rect(rdpContext *context, OPAQUE_RECT_ORDER *opaque_rect)
}
/******************************************************************************/
static void DEFAULT_CC
static void
lfreerdp_mem_blt(rdpContext *context, MEMBLT_ORDER *memblt)
{
int id;
@ -828,7 +828,7 @@ lfreerdp_mem_blt(rdpContext *context, MEMBLT_ORDER *memblt)
}
/******************************************************************************/
static void DEFAULT_CC
static void
lfreerdp_glyph_index(rdpContext *context, GLYPH_INDEX_ORDER *glyph_index)
{
struct mod *mod;
@ -889,7 +889,7 @@ lfreerdp_glyph_index(rdpContext *context, GLYPH_INDEX_ORDER *glyph_index)
}
/******************************************************************************/
static void DEFAULT_CC
static void
lfreerdp_line_to(rdpContext *context, LINE_TO_ORDER *line_to)
{
struct mod *mod;
@ -916,7 +916,7 @@ lfreerdp_line_to(rdpContext *context, LINE_TO_ORDER *line_to)
}
/******************************************************************************/
static void DEFAULT_CC
static void
lfreerdp_cache_bitmap(rdpContext *context, CACHE_BITMAP_ORDER *cache_bitmap_order)
{
LLOGLN(0, ("lfreerdp_cache_bitmap: - no code here"));
@ -924,7 +924,7 @@ lfreerdp_cache_bitmap(rdpContext *context, CACHE_BITMAP_ORDER *cache_bitmap_orde
/******************************************************************************/
/* Turn the bitmap upside down*/
static void DEFAULT_CC
static void
lfreerdp_upsidedown(uint8 *destination, CACHE_BITMAP_V2_ORDER *cache_bitmap_v2_order, int server_Bpp)
{
tui8 *src;
@ -951,7 +951,7 @@ lfreerdp_upsidedown(uint8 *destination, CACHE_BITMAP_V2_ORDER *cache_bitmap_v2_o
}
/******************************************************************************/
static void DEFAULT_CC
static void
lfreerdp_cache_bitmapV2(rdpContext *context,
CACHE_BITMAP_V2_ORDER *cache_bitmap_v2_order)
{
@ -1034,7 +1034,7 @@ lfreerdp_cache_bitmapV2(rdpContext *context,
}
/******************************************************************************/
static void DEFAULT_CC
static void
lfreerdp_cache_glyph(rdpContext *context, CACHE_GLYPH_ORDER *cache_glyph_order)
{
int index;
@ -1062,7 +1062,7 @@ lfreerdp_cache_glyph(rdpContext *context, CACHE_GLYPH_ORDER *cache_glyph_order)
}
/******************************************************************************/
static void DEFAULT_CC
static void
lfreerdp_cache_brush(rdpContext *context, CACHE_BRUSH_ORDER *cache_brush_order)
{
int idx;
@ -1126,7 +1126,7 @@ lfreerdp_cache_brush(rdpContext *context, CACHE_BRUSH_ORDER *cache_brush_order)
}
/******************************************************************************/
static void DEFAULT_CC
static void
lfreerdp_pointer_position(rdpContext *context,
POINTER_POSITION_UPDATE *pointer_position)
{
@ -1134,7 +1134,7 @@ lfreerdp_pointer_position(rdpContext *context,
}
/******************************************************************************/
static void DEFAULT_CC
static void
lfreerdp_pointer_system(rdpContext *context,
POINTER_SYSTEM_UPDATE *pointer_system)
{
@ -1142,7 +1142,7 @@ lfreerdp_pointer_system(rdpContext *context,
}
/******************************************************************************/
static void DEFAULT_CC
static void
lfreerdp_pointer_color(rdpContext *context,
POINTER_COLOR_UPDATE *pointer_color)
{
@ -1150,7 +1150,7 @@ lfreerdp_pointer_color(rdpContext *context,
}
/******************************************************************************/
static int APP_CC
static int
lfreerdp_get_pixel(void *bits, int width, int height, int bpp,
int delta, int x, int y)
{
@ -1183,7 +1183,7 @@ lfreerdp_get_pixel(void *bits, int width, int height, int bpp,
}
/******************************************************************************/
static int APP_CC
static int
lfreerdp_set_pixel(int pixel, void *bits, int width, int height, int bpp,
int delta, int x, int y)
{
@ -1229,7 +1229,7 @@ lfreerdp_set_pixel(int pixel, void *bits, int width, int height, int bpp,
}
/******************************************************************************/
static int APP_CC
static int
lfreerdp_convert_color_image(void *dst, int dst_width, int dst_height,
int dst_bpp, int dst_delta,
void *src, int src_width, int src_height,
@ -1254,7 +1254,7 @@ lfreerdp_convert_color_image(void *dst, int dst_width, int dst_height,
}
/******************************************************************************/
static void DEFAULT_CC
static void
lfreerdp_pointer_new(rdpContext *context,
POINTER_NEW_UPDATE *pointer_new)
{
@ -1341,7 +1341,7 @@ lfreerdp_pointer_new(rdpContext *context,
}
/******************************************************************************/
static void DEFAULT_CC
static void
lfreerdp_pointer_cached(rdpContext *context,
POINTER_CACHED_UPDATE *pointer_cached)
{
@ -1359,14 +1359,14 @@ lfreerdp_pointer_cached(rdpContext *context,
}
/******************************************************************************/
static void DEFAULT_CC
static void
lfreerdp_polygon_cb(rdpContext *context, POLYGON_CB_ORDER *polygon_cb)
{
LLOGLN(0, ("lfreerdp_polygon_sc called:- not supported!!!!!!!!!!!!!!!!!!!!"));
}
/******************************************************************************/
static void DEFAULT_CC
static void
lfreerdp_polygon_sc(rdpContext *context, POLYGON_SC_ORDER *polygon_sc)
{
struct mod *mod;
@ -1421,7 +1421,7 @@ lfreerdp_polygon_sc(rdpContext *context, POLYGON_SC_ORDER *polygon_sc)
}
/******************************************************************************/
static void DEFAULT_CC
static void
lfreerdp_synchronize(rdpContext *context)
{
struct mod *mod;
@ -1430,7 +1430,7 @@ lfreerdp_synchronize(rdpContext *context)
}
/******************************************************************************/
static boolean DEFAULT_CC
static boolean
lfreerdp_pre_connect(freerdp *instance)
{
struct mod *mod;
@ -1597,7 +1597,7 @@ lfreerdp_pre_connect(freerdp *instance)
}
/*****************************************************************************/
void DEFAULT_CC
void
lrail_WindowCreate(rdpContext *context, WINDOW_ORDER_INFO *orderInfo,
WINDOW_STATE_ORDER *window_state)
{
@ -1678,7 +1678,7 @@ lrail_WindowCreate(rdpContext *context, WINDOW_ORDER_INFO *orderInfo,
}
/*****************************************************************************/
void DEFAULT_CC
void
lrail_WindowUpdate(rdpContext *context, WINDOW_ORDER_INFO *orderInfo,
WINDOW_STATE_ORDER *window_state)
{
@ -1687,7 +1687,7 @@ lrail_WindowUpdate(rdpContext *context, WINDOW_ORDER_INFO *orderInfo,
}
/*****************************************************************************/
void DEFAULT_CC
void
lrail_WindowDelete(rdpContext *context, WINDOW_ORDER_INFO *orderInfo)
{
struct mod *mod;
@ -1698,7 +1698,7 @@ lrail_WindowDelete(rdpContext *context, WINDOW_ORDER_INFO *orderInfo)
}
/*****************************************************************************/
void DEFAULT_CC
void
lrail_WindowIcon(rdpContext *context, WINDOW_ORDER_INFO *orderInfo,
WINDOW_ICON_ORDER *window_icon)
{
@ -1724,7 +1724,7 @@ lrail_WindowIcon(rdpContext *context, WINDOW_ORDER_INFO *orderInfo,
}
/*****************************************************************************/
void DEFAULT_CC
void
lrail_WindowCachedIcon(rdpContext *context, WINDOW_ORDER_INFO *orderInfo,
WINDOW_CACHED_ICON_ORDER *window_cached_icon)
{
@ -1739,7 +1739,7 @@ lrail_WindowCachedIcon(rdpContext *context, WINDOW_ORDER_INFO *orderInfo,
}
/*****************************************************************************/
void DEFAULT_CC
void
lrail_NotifyIconCreate(rdpContext *context, WINDOW_ORDER_INFO *orderInfo,
NOTIFY_ICON_STATE_ORDER *notify_icon_state)
{
@ -1796,7 +1796,7 @@ lrail_NotifyIconCreate(rdpContext *context, WINDOW_ORDER_INFO *orderInfo,
}
/*****************************************************************************/
void DEFAULT_CC
void
lrail_NotifyIconUpdate(rdpContext *context, WINDOW_ORDER_INFO *orderInfo,
NOTIFY_ICON_STATE_ORDER *notify_icon_state)
{
@ -1805,7 +1805,7 @@ lrail_NotifyIconUpdate(rdpContext *context, WINDOW_ORDER_INFO *orderInfo,
}
/*****************************************************************************/
void DEFAULT_CC
void
lrail_NotifyIconDelete(rdpContext *context, WINDOW_ORDER_INFO *orderInfo)
{
struct mod *mod;
@ -1817,7 +1817,7 @@ lrail_NotifyIconDelete(rdpContext *context, WINDOW_ORDER_INFO *orderInfo)
}
/*****************************************************************************/
void DEFAULT_CC
void
lrail_MonitoredDesktop(rdpContext *context, WINDOW_ORDER_INFO *orderInfo,
MONITORED_DESKTOP_ORDER *monitored_desktop)
{
@ -1849,7 +1849,7 @@ lrail_MonitoredDesktop(rdpContext *context, WINDOW_ORDER_INFO *orderInfo,
}
/*****************************************************************************/
void DEFAULT_CC
void
lrail_NonMonitoredDesktop(rdpContext *context, WINDOW_ORDER_INFO *orderInfo)
{
struct mod *mod;
@ -1862,7 +1862,7 @@ lrail_NonMonitoredDesktop(rdpContext *context, WINDOW_ORDER_INFO *orderInfo)
}
/******************************************************************************/
static boolean DEFAULT_CC
static boolean
lfreerdp_post_connect(freerdp *instance)
{
struct mod *mod;
@ -1886,21 +1886,21 @@ lfreerdp_post_connect(freerdp *instance)
}
/******************************************************************************/
static void DEFAULT_CC
static void
lfreerdp_context_new(freerdp *instance, rdpContext *context)
{
LLOGLN(0, ("lfreerdp_context_new: %p", context));
}
/******************************************************************************/
static void DEFAULT_CC
static void
lfreerdp_context_free(freerdp *instance, rdpContext *context)
{
LLOGLN(0, ("lfreerdp_context_free: - no code here"));
}
/******************************************************************************/
static int DEFAULT_CC
static int
lfreerdp_receive_channel_data(freerdp *instance, int channelId, uint8 *data,
int size, int flags, int total_size)
{
@ -1941,7 +1941,7 @@ lfreerdp_receive_channel_data(freerdp *instance, int channelId, uint8 *data,
}
/******************************************************************************/
static boolean DEFAULT_CC
static boolean
lfreerdp_authenticate(freerdp *instance, char **username,
char **password, char **domain)
{
@ -1950,7 +1950,7 @@ lfreerdp_authenticate(freerdp *instance, char **username,
}
/******************************************************************************/
static boolean DEFAULT_CC
static boolean
lfreerdp_verify_certificate(freerdp *instance, char *subject, char *issuer,
char *fingerprint)
{
@ -1959,7 +1959,7 @@ lfreerdp_verify_certificate(freerdp *instance, char *subject, char *issuer,
}
/******************************************************************************/
static int DEFAULT_CC
static int
lfreerdp_session_info(freerdp* instance, uint8* data, int data_bytes)
{
struct mod *mod;

View File

@ -33,7 +33,7 @@
extern struct config_sesman *g_cfg; /* in sesman.c */
/******************************************************************************/
int DEFAULT_CC
int
access_login_allowed(const char *user)
{
int gid;
@ -82,7 +82,7 @@ access_login_allowed(const char *user)
}
/******************************************************************************/
int DEFAULT_CC
int
access_login_mng_allowed(const char *user)
{
int gid;

View File

@ -34,7 +34,7 @@
* @return 0 if access is denied, !=0 if allowed
*
*/
int DEFAULT_CC
int
access_login_allowed(const char *user);
/**
@ -44,7 +44,7 @@ access_login_allowed(const char *user);
* @return 0 if access is denied, !=0 if allowed
*
*/
int DEFAULT_CC
int
access_login_mng_allowed(const char *user);
#endif

View File

@ -35,7 +35,7 @@
* @return non-zero handle on success, 0 on failure
*
*/
long DEFAULT_CC
long
auth_userpass(const char *user, const char *pass, int *errorcode);
/**
@ -46,7 +46,7 @@ auth_userpass(const char *user, const char *pass, int *errorcode);
* @return 0 on success, 1 on failure
*
*/
int DEFAULT_CC
int
auth_start_session(long in_val, int in_display);
/**
@ -56,7 +56,7 @@ auth_start_session(long in_val, int in_display);
* @return 0 on success, 1 on failure
*
*/
int DEFAULT_CC
int
auth_stop_session(long in_val);
/**
@ -66,7 +66,7 @@ auth_stop_session(long in_val);
* @return 0 on success, 1 on failure
*
*/
int DEFAULT_CC
int
auth_end(long in_val);
/**
@ -76,7 +76,7 @@ auth_end(long in_val);
* @return 0 on success, 1 on failure
*
*/
int DEFAULT_CC
int
auth_set_env(long in_val);
@ -93,7 +93,7 @@ auth_set_env(long in_val);
* @return 0 on success, 1 on failure
*
*/
int DEFAULT_CC
int
auth_check_pwd_chg(const char *user);
/**
@ -103,7 +103,7 @@ auth_check_pwd_chg(const char *user);
* @return 0 on success, 1 on failure
*
*/
int DEFAULT_CC
int
auth_change_pwd(const char *user, const char *newpwd);
#endif

View File

@ -93,7 +93,7 @@ static struct timeout_obj *g_timeout_head = 0;
static struct timeout_obj *g_timeout_tail = 0;
/*****************************************************************************/
int APP_CC
int
add_timeout(int msoffset, void (*callback)(void *data), void *data)
{
struct timeout_obj *tobj;
@ -119,7 +119,7 @@ add_timeout(int msoffset, void (*callback)(void *data), void *data)
}
/*****************************************************************************/
static int APP_CC
static int
get_timeout(int *timeout)
{
struct timeout_obj *tobj;
@ -165,7 +165,7 @@ get_timeout(int *timeout)
}
/*****************************************************************************/
static int APP_CC
static int
check_timeout(void)
{
struct timeout_obj *tobj;
@ -219,7 +219,7 @@ check_timeout(void)
}
/*****************************************************************************/
int DEFAULT_CC
int
g_is_term(void)
{
return g_is_wait_obj_set(g_term_event);
@ -228,7 +228,7 @@ g_is_term(void)
/*****************************************************************************/
/* add data to chan_item, on its way to the client */
/* returns error */
static int APP_CC
static int
add_data_to_chan_item(struct chan_item *chan_item, char *data, int size)
{
struct stream *s;
@ -257,7 +257,7 @@ add_data_to_chan_item(struct chan_item *chan_item, char *data, int size)
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
send_data_from_chan_item(struct chan_item *chan_item)
{
struct stream *s;
@ -327,7 +327,7 @@ send_data_from_chan_item(struct chan_item *chan_item)
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
check_chan_items(void)
{
int index;
@ -345,7 +345,7 @@ check_chan_items(void)
/*****************************************************************************/
/* returns error */
int APP_CC
int
send_channel_data(int chan_id, char *data, int size)
{
int index;
@ -375,7 +375,7 @@ send_channel_data(int chan_id, char *data, int size)
/*****************************************************************************/
/* returns error */
int APP_CC
int
send_rail_drawing_orders(char* data, int size)
{
LOGM((LOG_LEVEL_DEBUG, "chansrv::send_rail_drawing_orders: size %d", size));
@ -400,7 +400,7 @@ send_rail_drawing_orders(char* data, int size)
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
send_init_response_message(void)
{
struct stream *s = (struct stream *)NULL;
@ -423,7 +423,7 @@ send_init_response_message(void)
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
send_channel_setup_response_message(void)
{
struct stream *s = (struct stream *)NULL;
@ -446,7 +446,7 @@ send_channel_setup_response_message(void)
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
send_channel_data_response_message(void)
{
struct stream *s = (struct stream *)NULL;
@ -469,7 +469,7 @@ send_channel_data_response_message(void)
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
process_message_init(struct stream *s)
{
LOGM((LOG_LEVEL_DEBUG, "process_message_init:"));
@ -478,7 +478,7 @@ process_message_init(struct stream *s)
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
process_message_channel_setup(struct stream *s)
{
int num_chans;
@ -604,7 +604,7 @@ process_message_channel_setup(struct stream *s)
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
process_message_channel_data(struct stream *s)
{
int chan_id = 0;
@ -683,7 +683,7 @@ process_message_channel_data(struct stream *s)
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
process_message_channel_data_response(struct stream *s)
{
LOG(10, ("process_message_channel_data_response:"));
@ -693,7 +693,7 @@ process_message_channel_data_response(struct stream *s)
/*****************************************************************************/
/* returns error */
static int APP_CC
static int
process_message(void)
{
struct stream *s = (struct stream *)NULL;
@ -755,7 +755,7 @@ process_message(void)
/*****************************************************************************/
/* returns error */
int DEFAULT_CC
int
my_trans_data_in(struct trans *trans)
{
struct stream *s = (struct stream *)NULL;
@ -791,7 +791,7 @@ my_trans_data_in(struct trans *trans)
* called when WTSVirtualChannelWrite() is invoked in xrdpapi.c
*
******************************************************************************/
int DEFAULT_CC
int
my_api_trans_data_in(struct trans *trans)
{
struct stream *s;
@ -885,7 +885,7 @@ my_api_trans_data_in(struct trans *trans)
}
/*****************************************************************************/
int DEFAULT_CC
int
my_trans_conn_in(struct trans *trans, struct trans *new_trans)
{
if (trans == 0)
@ -922,7 +922,7 @@ my_trans_conn_in(struct trans *trans, struct trans *new_trans)
* called when WTSVirtualChannelOpenEx is invoked in xrdpapi.c
*
******************************************************************************/
int DEFAULT_CC
int
my_api_trans_conn_in(struct trans *trans, struct trans *new_trans)
{
struct xrdp_api_data *ad;
@ -1016,7 +1016,7 @@ my_api_trans_conn_in(struct trans *trans, struct trans *new_trans)
}
/*****************************************************************************/
static int APP_CC
static int
setup_listen(void)
{
char port[256];
@ -1054,7 +1054,7 @@ setup_listen(void)
}
/*****************************************************************************/
static int APP_CC
static int
setup_api_listen(void)
{
char port[256];
@ -1235,7 +1235,7 @@ channel_thread_loop(void *in_val)
}
/*****************************************************************************/
void DEFAULT_CC
void
term_signal_handler(int sig)
{
LOGM((LOG_LEVEL_INFO, "term_signal_handler: got signal %d", sig));
@ -1243,14 +1243,14 @@ term_signal_handler(int sig)
}
/*****************************************************************************/
void DEFAULT_CC
void
nil_signal_handler(int sig)
{
LOGM((LOG_LEVEL_INFO, "nil_signal_handler: got signal %d", sig));
}
/*****************************************************************************/
void DEFAULT_CC
void
child_signal_handler(int sig)
{
int pid;
@ -1270,7 +1270,7 @@ child_signal_handler(int sig)
}
/*****************************************************************************/
void DEFAULT_CC
void
segfault_signal_handler(int sig)
{
LOG(0, ("segfault_signal_handler: entered......."));
@ -1279,7 +1279,7 @@ segfault_signal_handler(int sig)
}
/*****************************************************************************/
static int APP_CC
static int
get_display_num_from_display(char *display_text)
{
int index;
@ -1338,7 +1338,7 @@ get_display_num_from_display(char *display_text)
}
/*****************************************************************************/
int APP_CC
int
main_cleanup(void)
{
g_delete_wait_obj(g_term_event);
@ -1350,7 +1350,7 @@ main_cleanup(void)
}
/*****************************************************************************/
static int APP_CC
static int
read_ini(void)
{
char filename[256];
@ -1391,7 +1391,7 @@ read_ini(void)
}
/*****************************************************************************/
static int APP_CC
static int
get_log_path(char *path, int bytes)
{
char* log_path;
@ -1443,7 +1443,7 @@ get_log_path(char *path, int bytes)
}
/*****************************************************************************/
static enum logLevels APP_CC
static enum logLevels
get_log_level(const char* level_str, enum logLevels default_level)
{
static const char* levels[] = {
@ -1470,7 +1470,7 @@ get_log_level(const char* level_str, enum logLevels default_level)
}
/*****************************************************************************/
static int APP_CC
static int
run_exec(void)
{
int pid;
@ -1497,7 +1497,7 @@ run_exec(void)
}
/*****************************************************************************/
int DEFAULT_CC
int
main(int argc, char **argv)
{
tbus waiters[4];
@ -1640,7 +1640,7 @@ main(int argc, char **argv)
*
* @return unused slot index on success, -1 on failure
******************************************************************************/
int APP_CC
int
find_empty_slot_in_dvc_channels(void)
{
int i;
@ -1663,7 +1663,7 @@ find_empty_slot_in_dvc_channels(void)
*
* @return xrdp_api_data struct containing dvc_chan_id or NULL on failure
******************************************************************************/
struct xrdp_api_data *APP_CC
struct xrdp_api_data *
struct_from_dvc_chan_id(tui32 dvc_chan_id)
{
int i;

View File

@ -54,15 +54,15 @@ struct xrdp_api_data
int is_connected;
};
int DEFAULT_CC
int
g_is_term(void);
int APP_CC send_channel_data(int chan_id, char *data, int size);
int APP_CC send_rail_drawing_orders(char* data, int size);
int APP_CC main_cleanup(void);
int APP_CC add_timeout(int msoffset, void (*callback)(void* data), void* data);
int APP_CC find_empty_slot_in_dvc_channels(void);
struct xrdp_api_data * APP_CC struct_from_dvc_chan_id(tui32 dvc_chan_id);
int send_channel_data(int chan_id, char *data, int size);
int send_rail_drawing_orders(char* data, int size);
int main_cleanup(void);
int add_timeout(int msoffset, void (*callback)(void* data), void* data);
int find_empty_slot_in_dvc_channels(void);
struct xrdp_api_data * struct_from_dvc_chan_id(tui32 dvc_chan_id);
int remove_struct_with_chan_id(tui32 dvc_chan_id);
#define LOG_LEVEL 5

View File

@ -365,7 +365,7 @@ static void xfuse_mark_as_stale(fuse_ino_t pinode);
static void xfuse_delete_stale_entries(fuse_ino_t pinode);
/*****************************************************************************/
int APP_CC
int
load_fuse_config(void)
{
int index;
@ -407,7 +407,7 @@ load_fuse_config(void)
* @return 0 on success, -1 on failure
*****************************************************************************/
int APP_CC
int
xfuse_init(void)
{
struct fuse_args args = FUSE_ARGS_INIT(0, NULL);
@ -489,7 +489,7 @@ xfuse_init(void)
* @return 0 on success, -1 on failure
*****************************************************************************/
int APP_CC
int
xfuse_deinit(void)
{
xfuse_deinit_xrdp_fs();

View File

@ -286,7 +286,7 @@ static int g_file_format_id = -1;
static char g_last_atom_name[256] = "";
/*****************************************************************************/
static char* APP_CC
static char*
get_atom_text(Atom atom)
{
char* name;
@ -318,7 +318,7 @@ get_atom_text(Atom atom)
/*****************************************************************************/
/* this is one way to get the current time from the x server */
static Time APP_CC
static Time
clipboard_get_server_time(void)
{
XEvent xevent;
@ -340,7 +340,7 @@ clipboard_get_server_time(void)
}
/*****************************************************************************/
static int APP_CC
static int
clipboard_find_format_id(int format_id)
{
int index;
@ -357,7 +357,7 @@ clipboard_find_format_id(int format_id)
/*****************************************************************************/
/* returns error */
int APP_CC
int
clipboard_init(void)
{
struct stream *s;
@ -510,7 +510,7 @@ clipboard_init(void)
}
/*****************************************************************************/
int APP_CC
int
clipboard_deinit(void)
{
LOG(0, ("clipboard_deinit:"));
@ -534,7 +534,7 @@ clipboard_deinit(void)
}
/*****************************************************************************/
static int APP_CC
static int
clipboard_send_data_request(int format_id)
{
struct stream *s;
@ -561,7 +561,7 @@ clipboard_send_data_request(int format_id)
}
/*****************************************************************************/
static int APP_CC
static int
clipboard_send_format_ack(void)
{
struct stream *s;
@ -585,7 +585,7 @@ clipboard_send_format_ack(void)
/*****************************************************************************/
/* returns number of bytes written */
int APP_CC
int
clipboard_out_unicode(struct stream *s, const char *text, int num_chars)
{
int index;
@ -620,7 +620,7 @@ clipboard_out_unicode(struct stream *s, const char *text, int num_chars)
/*****************************************************************************/
/* returns number of bytes read */
int APP_CC
int
clipboard_in_unicode(struct stream *s, char *text, int *num_chars)
{
int index;
@ -660,7 +660,7 @@ static char windows_native_format[] =
};
/*****************************************************************************/
static int APP_CC
static int
clipboard_send_format_announce(int xrdp_clip_type)
{
struct stream *s;
@ -781,7 +781,7 @@ clipboard_send_format_announce(int xrdp_clip_type)
}
/*****************************************************************************/
static int APP_CC
static int
clipboard_send_data_response_for_image(const char *data, int data_size)
{
struct stream *s;
@ -805,7 +805,7 @@ clipboard_send_data_response_for_image(const char *data, int data_size)
}
/*****************************************************************************/
static int APP_CC
static int
clipboard_send_data_response_for_text(const char *data, int data_size)
{
struct stream *s;
@ -848,7 +848,7 @@ clipboard_send_data_response_for_text(const char *data, int data_size)
}
/*****************************************************************************/
static int APP_CC
static int
clipboard_send_data_response(int xrdp_clip_type, const char *data, int data_size)
{
log_debug("clipboard_send_data_response:");
@ -880,7 +880,7 @@ clipboard_send_data_response(int xrdp_clip_type, const char *data, int data_size
}
/*****************************************************************************/
static int APP_CC
static int
clipboard_set_selection_owner(void)
{
Window owner;
@ -901,7 +901,7 @@ clipboard_set_selection_owner(void)
}
/*****************************************************************************/
static int APP_CC
static int
clipboard_provide_selection_c2s(XSelectionRequestEvent *req, Atom type)
{
XEvent xev;
@ -957,7 +957,7 @@ clipboard_provide_selection_c2s(XSelectionRequestEvent *req, Atom type)
}
/*****************************************************************************/
static int APP_CC
static int
clipboard_provide_selection(XSelectionRequestEvent *req, Atom type, int format,
char *data, int length)
{
@ -987,7 +987,7 @@ clipboard_provide_selection(XSelectionRequestEvent *req, Atom type, int format,
}
/*****************************************************************************/
static int APP_CC
static int
clipboard_refuse_selection(XSelectionRequestEvent *req)
{
XEvent xev;
@ -1009,7 +1009,7 @@ clipboard_refuse_selection(XSelectionRequestEvent *req)
/* sent by client or server when its local system clipboard is
updated with new clipboard data; contains Clipboard Format ID
and name pairs of new Clipboard Formats on the clipboard. */
static int APP_CC
static int
clipboard_process_format_announce(struct stream *s, int clip_msg_status,
int clip_msg_len)
{
@ -1089,7 +1089,7 @@ clipboard_process_format_announce(struct stream *s, int clip_msg_status,
/*****************************************************************************/
/* response to CB_FORMAT_LIST; used to indicate whether
processing of the Format List PDU was successful */
static int APP_CC
static int
clipboard_process_format_ack(struct stream *s, int clip_msg_status,
int clip_msg_len)
{
@ -1123,7 +1123,7 @@ clipboard_send_data_response_failed(void)
/* sent from server to client
* sent by recipient of CB_FORMAT_LIST; used to request data for one
* of the formats that was listed in CB_FORMAT_LIST */
static int APP_CC
static int
clipboard_process_data_request(struct stream *s, int clip_msg_status,
int clip_msg_len)
{
@ -1199,7 +1199,7 @@ clipboard_process_data_request(struct stream *s, int clip_msg_status,
processing of the CB_FORMAT_DATA_REQUEST was successful; if processing
was successful, CB_FORMAT_DATA_RESPONSE includes contents of requested
clipboard data. */
static int APP_CC
static int
clipboard_process_data_response_for_image(struct stream *s,
int clip_msg_status,
int clip_msg_len)
@ -1243,7 +1243,7 @@ clipboard_process_data_response_for_image(struct stream *s,
successful, CB_FORMAT_DATA_RESPONSE includes contents of requested
clipboard data. */
/*****************************************************************************/
static int APP_CC
static int
clipboard_process_data_response(struct stream *s, int clip_msg_status,
int clip_msg_len)
{
@ -1335,7 +1335,7 @@ clipboard_process_data_response(struct stream *s, int clip_msg_status,
}
/*****************************************************************************/
static int APP_CC
static int
clipboard_process_clip_caps(struct stream *s, int clip_msg_status,
int clip_msg_len)
{
@ -1383,7 +1383,7 @@ clipboard_process_clip_caps(struct stream *s, int clip_msg_status,
}
/*****************************************************************************/
static int APP_CC
static int
ss_part(char *data, int data_bytes)
{
int index;
@ -1440,7 +1440,7 @@ ss_part(char *data, int data_bytes)
}
/*****************************************************************************/
static int APP_CC
static int
ss_end(void)
{
char *data;
@ -1475,7 +1475,7 @@ ss_end(void)
}
/*****************************************************************************/
static int APP_CC
static int
ss_start(char *data, int data_bytes, int total_bytes)
{
XEvent xev;
@ -1538,7 +1538,7 @@ ss_start(char *data, int data_bytes, int total_bytes)
}
/*****************************************************************************/
int APP_CC
int
clipboard_data_in(struct stream *s, int chan_id, int chan_flags, int length,
int total_length)
{
@ -1695,7 +1695,7 @@ clipboard_data_in(struct stream *s, int chan_id, int chan_flags, int length,
Time timestamp;
Time selection_timestamp;
} XFixesSelectionNotifyEvent; */
static int APP_CC
static int
clipboard_event_selection_owner_notify(XEvent *xevent)
{
XFixesSelectionNotifyEvent *lxevent;
@ -1727,7 +1727,7 @@ clipboard_event_selection_owner_notify(XEvent *xevent)
/*****************************************************************************/
/* returns error
get a window property from wnd */
static int APP_CC
static int
clipboard_get_window_property(Window wnd, Atom prop, Atom *type, int *fmt,
int *n_items, char **xdata, int *xdata_size)
{
@ -1835,7 +1835,7 @@ clipboard_get_window_property(Window wnd, Atom prop, Atom *type, int *fmt,
Atom property; // atom or None
Time time;
} XSelectionEvent; */
static int APP_CC
static int
clipboard_event_selection_notify(XEvent *xevent)
{
XSelectionEvent *lxevent;
@ -2130,7 +2130,7 @@ clipboard_event_selection_notify(XEvent *xevent)
* doesn't mean a 32bit value, but actually a long. So 32 means 4 bytes on
* a 32bit machine and 8 bytes on a 64 machine
*/
static int APP_CC
static int
clipboard_event_selection_request(XEvent *xevent)
{
XSelectionRequestEvent *lxev;
@ -2297,7 +2297,7 @@ clipboard_event_selection_request(XEvent *xevent)
Atom selection;
Time time;
} XSelectionClearEvent; */
static int APP_CC
static int
clipboard_event_selection_clear(XEvent *xevent)
{
log_debug("clipboard_event_selection_clear:");
@ -2316,7 +2316,7 @@ clipboard_event_selection_clear(XEvent *xevent)
Time time;
int state; // PropertyNewValue or PropertyDelete
} XPropertyEvent; */
static int APP_CC
static int
clipboard_event_property_notify(XEvent *xevent)
{
Atom actual_type_return;
@ -2479,7 +2479,7 @@ clipboard_event_property_notify(XEvent *xevent)
/*****************************************************************************/
/* returns 0, event handled, 1 unhandled */
int APP_CC
int
clipboard_xevent(void *xevent)
{
XEvent *lxevent;

View File

@ -23,9 +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 clipboard_init(void);
int clipboard_deinit(void);
int clipboard_data_in(struct stream *s, int chan_id, int chan_flags, int length, int total_length);
int clipboard_xevent(void *xevent);
#endif

View File

@ -127,8 +127,8 @@ struct clip_file_desc /* CLIPRDR_FILEDESCRIPTOR */
char cFileName[256];
};
int APP_CC clipboard_out_unicode(struct stream *s, const char *text,
int clipboard_out_unicode(struct stream *s, const char *text,
int num_chars);
int APP_CC clipboard_in_unicode(struct stream *s, char *text, int *num_chars);
int clipboard_in_unicode(struct stream *s, char *text, int *num_chars);
#endif

View File

@ -107,7 +107,7 @@ static int g_file_request_sent_type = 0;
/*****************************************************************************/
#if 0
static tui64 APP_CC
static tui64
timeval2wintime(struct timeval *tv)
{
tui64 result;
@ -123,7 +123,7 @@ timeval2wintime(struct timeval *tv)
/*****************************************************************************/
/* this will replace %20 or any hex with the space or correct char
* returns error */
static int APP_CC
static int
clipboard_check_file(char *filename)
{
char lfilename[256];
@ -158,7 +158,7 @@ clipboard_check_file(char *filename)
}
/*****************************************************************************/
static int APP_CC
static int
clipboard_get_file(const char *file, int bytes)
{
int sindex;
@ -236,7 +236,7 @@ clipboard_get_file(const char *file, int bytes)
}
/*****************************************************************************/
static int APP_CC
static int
clipboard_get_files(const char *files, int bytes)
{
int index;
@ -278,7 +278,7 @@ clipboard_get_files(const char *files, int bytes)
/*****************************************************************************/
/* server to client */
/* response to client asking for clipboard contents that is file list */
int APP_CC
int
clipboard_send_data_response_for_file(const char *data, int data_size)
{
struct stream *s;
@ -344,7 +344,7 @@ clipboard_send_data_response_for_file(const char *data, int data_size)
/*****************************************************************************/
/* send the file size from server to the client */
static int APP_CC
static int
clipboard_send_file_size(int streamId, int lindex)
{
struct stream *s;
@ -385,7 +385,7 @@ clipboard_send_file_size(int streamId, int lindex)
/*****************************************************************************/
/* ask the client to send the file size */
int APP_CC
int
clipboard_request_file_size(int stream_id, int lindex)
{
struct stream *s;
@ -421,7 +421,7 @@ clipboard_request_file_size(int stream_id, int lindex)
/*****************************************************************************/
/* send a chunk of the file from server to client */
static int APP_CC
static int
clipboard_send_file_data(int streamId, int lindex,
int nPositionLow, int cbRequested)
{
@ -488,7 +488,7 @@ clipboard_send_file_data(int streamId, int lindex,
/*****************************************************************************/
/* ask the client to send the file size */
int APP_CC
int
clipboard_request_file_data(int stream_id, int lindex, int offset,
int request_bytes)
{
@ -528,7 +528,7 @@ clipboard_request_file_data(int stream_id, int lindex, int offset,
/*****************************************************************************/
/* client is asking from info about a file */
int APP_CC
int
clipboard_process_file_request(struct stream *s, int clip_msg_status,
int clip_msg_len)
{
@ -562,7 +562,7 @@ clipboard_process_file_request(struct stream *s, int clip_msg_status,
/*****************************************************************************/
/* server requested info about the file and this is the response
it's either the file size or file data */
int APP_CC
int
clipboard_process_file_response(struct stream *s, int clip_msg_status,
int clip_msg_len)
{
@ -595,7 +595,7 @@ clipboard_process_file_response(struct stream *s, int clip_msg_status,
/*****************************************************************************/
/* read in CLIPRDR_FILEDESCRIPTOR */
static int APP_CC
static int
clipboard_c2s_in_file_info(struct stream *s, struct clip_file_desc *cfd)
{
int num_chars;
@ -627,7 +627,7 @@ clipboard_c2s_in_file_info(struct stream *s, struct clip_file_desc *cfd)
}
/*****************************************************************************/
int APP_CC
int
clipboard_c2s_in_files(struct stream *s, char *file_list)
{
int cItems;

View File

@ -22,20 +22,20 @@
#include "arch.h"
#include "parse.h"
int APP_CC
int
clipboard_send_data_response_for_file(const char *data, int data_size);
int APP_CC
int
clipboard_process_file_request(struct stream *s, int clip_msg_status,
int clip_msg_len);
int APP_CC
int
clipboard_process_file_response(struct stream *s, int clip_msg_status,
int clip_msg_len);
int APP_CC
int
clipboard_c2s_in_files(struct stream *s, char *file_list);
int APP_CC
int
clipboard_request_file_size(int stream_id, int lindex);
int APP_CC
int
clipboard_request_file_data(int stream_id, int lindex, int offset,
int request_bytes);

View File

@ -109,7 +109,7 @@ struct stream *g_input_stream = NULL;
void xfuse_devredir_cb_write_file(void *vp, const char *buf, size_t length);
/*****************************************************************************/
int APP_CC
int
dev_redir_init(void)
{
struct stream *s;
@ -156,7 +156,7 @@ dev_redir_init(void)
}
/*****************************************************************************/
int APP_CC
int
dev_redir_deinit(void)
{
scard_deinit();
@ -169,7 +169,7 @@ dev_redir_deinit(void)
* @return 0 on success, -1 on failure
*****************************************************************************/
int APP_CC
int
dev_redir_data_in(struct stream *s, int chan_id, int chan_flags, int length,
int total_length)
{
@ -287,7 +287,7 @@ done:
}
/*****************************************************************************/
int APP_CC
int
dev_redir_get_wait_objs(tbus *objs, int *count, int *timeout)
{
if (g_is_smartcard_redir_supported)
@ -298,7 +298,7 @@ dev_redir_get_wait_objs(tbus *objs, int *count, int *timeout)
}
/*****************************************************************************/
int APP_CC
int
dev_redir_check_wait_objs(void)
{
if (g_is_smartcard_redir_supported)
@ -720,7 +720,7 @@ void devredir_proc_client_devlist_announce_req(struct stream *s)
}
}
void APP_CC
void
dev_redir_proc_device_iocompletion(struct stream *s)
{
FUSE_DATA *fuse_data = NULL;
@ -884,7 +884,7 @@ done:
log_debug("exiting");
}
void APP_CC
void
dev_redir_proc_query_dir_response(IRP *irp,
struct stream *s_in,
tui32 DeviceId,
@ -1001,7 +1001,7 @@ dev_redir_proc_query_dir_response(IRP *irp,
* @return 0 on success, -1 on failure
*****************************************************************************/
int APP_CC
int
dev_redir_get_dir_listing(void *fusep, tui32 device_id, const char *path)
{
tui32 DesiredAccess;
@ -1048,7 +1048,7 @@ dev_redir_get_dir_listing(void *fusep, tui32 device_id, const char *path)
return rval;
}
int APP_CC
int
dev_redir_file_open(void *fusep, tui32 device_id, const char *path,
int mode, int type, const char *gen_buf)
{
@ -1166,7 +1166,7 @@ int devredir_file_close(void *fusep, tui32 device_id, tui32 FileId)
* Remove (delete) a directory or file
*****************************************************************************/
int APP_CC
int
devredir_rmdir_or_file(void *fusep, tui32 device_id, const char *path, int mode)
{
tui32 DesiredAccess;
@ -1209,7 +1209,7 @@ devredir_rmdir_or_file(void *fusep, tui32 device_id, const char *path, int mode)
* @return 0 on success, -1 on failure
*****************************************************************************/
int APP_CC
int
devredir_file_read(void *fusep, tui32 DeviceId, tui32 FileId,
tui32 Length, tui64 Offset)
{
@ -1260,7 +1260,7 @@ devredir_file_read(void *fusep, tui32 DeviceId, tui32 FileId,
return 0;
}
int APP_CC
int
dev_redir_file_write(void *fusep, tui32 DeviceId, tui32 FileId,
const char *buf, int Length, tui64 Offset)
{
@ -1327,7 +1327,7 @@ dev_redir_file_write(void *fusep, tui32 DeviceId, tui32 FileId,
* @return FUSE_DATA on success, or NULL on failure
*****************************************************************************/
FUSE_DATA *APP_CC
FUSE_DATA *
devredir_fuse_data_peek(IRP *irp)
{
log_debug("returning %p", irp->fd_head);
@ -1340,7 +1340,7 @@ devredir_fuse_data_peek(IRP *irp)
* @return FUSE_DATA on success, NULL on failure
*****************************************************************************/
FUSE_DATA *APP_CC
FUSE_DATA *
devredir_fuse_data_dequeue(IRP *irp)
{
FUSE_DATA *head;
@ -1376,7 +1376,7 @@ devredir_fuse_data_dequeue(IRP *irp)
* @return 0 on success, -1 on failure
*****************************************************************************/
int APP_CC
int
devredir_fuse_data_enqueue(IRP *irp, void *vp)
{
FUSE_DATA *fd;
@ -1415,7 +1415,7 @@ devredir_fuse_data_enqueue(IRP *irp, void *vp)
** miscellaneous stuff **
******************************************************************************/
void APP_CC
void
devredir_insert_DeviceIoRequest(struct stream *s,
tui32 DeviceId,
tui32 FileId,
@ -1437,7 +1437,7 @@ devredir_insert_DeviceIoRequest(struct stream *s,
* Convert / to windows compatible \
*****************************************************************************/
void APP_CC
void
devredir_cvt_slash(char *path)
{
char *cptr = path;
@ -1450,7 +1450,7 @@ devredir_cvt_slash(char *path)
}
}
void APP_CC
void
devredir_cvt_to_unicode(char *unicode, const char *path)
{
char *dest;
@ -1476,7 +1476,7 @@ devredir_cvt_to_unicode(char *unicode, const char *path)
*dest++ = 0;
}
void APP_CC
void
devredir_cvt_from_unicode_len(char *path, char *unicode, int len)
{
char *dest;
@ -1513,7 +1513,7 @@ devredir_cvt_from_unicode_len(char *path, char *unicode, int len)
g_free(dest_saved);
}
int APP_CC
int
dev_redir_string_ends_with(char *string, char c)
{
int len;
@ -1522,7 +1522,7 @@ dev_redir_string_ends_with(char *string, char c)
return (string[len - 1] == c) ? 1 : 0;
}
void APP_CC
void
devredir_insert_RDPDR_header(struct stream *s, tui16 Component,
tui16 PacketId)
{
@ -1530,7 +1530,7 @@ devredir_insert_RDPDR_header(struct stream *s, tui16 Component,
xstream_wr_u16_le(s, PacketId);
}
void APP_CC
void
devredir_proc_cid_rmdir_or_file(IRP *irp, tui32 IoStatus)
{
struct stream *s;
@ -1567,7 +1567,7 @@ devredir_proc_cid_rmdir_or_file(IRP *irp, tui32 IoStatus)
return;
}
void APP_CC
void
devredir_proc_cid_rmdir_or_file_resp(IRP *irp, tui32 IoStatus)
{
FUSE_DATA *fuse_data;
@ -1594,7 +1594,7 @@ devredir_proc_cid_rmdir_or_file_resp(IRP *irp, tui32 IoStatus)
IRP_MJ_CLOSE, 0, 32);
}
void APP_CC
void
devredir_proc_cid_rename_file(IRP *irp, tui32 IoStatus)
{
struct stream *s;
@ -1647,7 +1647,7 @@ devredir_proc_cid_rename_file(IRP *irp, tui32 IoStatus)
return;
}
void APP_CC
void
devredir_proc_cid_rename_file_resp(IRP *irp, tui32 IoStatus)
{
FUSE_DATA *fuse_data;

View File

@ -31,14 +31,14 @@ FUSE_DATA *devredir_fuse_data_peek(IRP *irp);
FUSE_DATA *devredir_fuse_data_dequeue(IRP *irp);
int devredir_fuse_data_enqueue(IRP *irp, void *vp);
int APP_CC dev_redir_init(void);
int APP_CC dev_redir_deinit(void);
int dev_redir_init(void);
int dev_redir_deinit(void);
int APP_CC dev_redir_data_in(struct stream* s, int chan_id, int chan_flags,
int dev_redir_data_in(struct stream* s, int chan_id, int chan_flags,
int length, int total_length);
int APP_CC dev_redir_get_wait_objs(tbus* objs, int* count, int* timeout);
int APP_CC dev_redir_check_wait_objs(void);
int dev_redir_get_wait_objs(tbus* objs, int* count, int* timeout);
int dev_redir_check_wait_objs(void);
void dev_redir_send_server_core_cap_req(void);
void dev_redir_send_server_clientID_confirm(void);
@ -105,11 +105,11 @@ int devredir_file_close(void *fusep, tui32 device_id, tui32 file_id);
int devredir_file_read(void *fusep, tui32 device_id, tui32 FileId,
tui32 Length, tui64 Offset);
int APP_CC
int
dev_redir_file_write(void *fusep, tui32 DeviceId, tui32 FileId,
const char *buf, int Length, tui64 Offset);
int APP_CC
int
devredir_rmdir_or_file(void *fusep, tui32 device_id, const char *path, int mode);
/*

View File

@ -25,21 +25,21 @@
extern int g_drdynvc_chan_id; /* in chansrv.c */
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);
static int drdynvc_send_capability_request(uint16_t version);
static int drdynvc_process_capability_response(struct stream* s, unsigned char cmd);
static int drdynvc_process_open_channel_response(struct stream *s, unsigned char cmd);
static int drdynvc_process_close_channel_response(struct stream *s, unsigned char cmd);
static int drdynvc_process_data_first(struct stream* s, unsigned char cmd);
static int drdynvc_process_data(struct stream* s, unsigned char cmd);
static int drdynvc_insert_uint_124(struct stream *s, uint32_t val);
static int drdynvc_get_chan_id(struct stream *s, char cmd, uint32_t *chan_id_p);
/**
* bring up dynamic virtual channel
*
* @return 0 on success, -1 on response
******************************************************************************/
int APP_CC
int
drdynvc_init(void)
{
/* bring up X11 */
@ -57,7 +57,7 @@ drdynvc_init(void)
*
* @return 0 on success, -1 on response
******************************************************************************/
static int APP_CC
static int
drdynvc_send_capability_request(uint16_t version)
{
struct stream *s;
@ -92,7 +92,7 @@ drdynvc_send_capability_request(uint16_t version)
*
* @return 0 on success, -1 on failure
******************************************************************************/
static int APP_CC
static int
drdynvc_process_capability_response(struct stream *s, unsigned char cmd)
{
int cap_version;
@ -125,7 +125,7 @@ drdynvc_process_capability_response(struct stream *s, unsigned char cmd)
*
* @return 0 on success, -1 on failure
******************************************************************************/
int APP_CC
int
drdynvc_send_open_channel_request(int chan_pri, unsigned int chan_id,
char *chan_name)
{
@ -165,7 +165,7 @@ drdynvc_send_open_channel_request(int chan_pri, unsigned int chan_id,
return 0;
}
static int APP_CC
static int
drdynvc_process_open_channel_response(struct stream *s, unsigned char cmd)
{
struct xrdp_api_data *adp;
@ -199,7 +199,7 @@ drdynvc_process_open_channel_response(struct stream *s, unsigned char cmd)
return 0;
}
int APP_CC
int
drdynvc_send_close_channel_request(unsigned int chan_id)
{
struct stream *s;
@ -226,7 +226,7 @@ drdynvc_send_close_channel_request(unsigned int chan_id)
return 0;
}
static int APP_CC
static int
drdynvc_process_close_channel_response(struct stream *s, unsigned char cmd)
{
uint32_t chan_id;
@ -247,7 +247,7 @@ drdynvc_process_close_channel_response(struct stream *s, unsigned char cmd)
*
* @return 0 on success, -1 on failure
******************************************************************************/
int APP_CC drdynvc_write_data(uint32_t chan_id, char *data, int data_size)
int drdynvc_write_data(uint32_t chan_id, char *data, int data_size)
{
struct stream *s;
char *saved_ptr;
@ -338,7 +338,7 @@ int APP_CC drdynvc_write_data(uint32_t chan_id, char *data, int data_size)
return 0;
}
static int APP_CC
static int
drdynvc_process_data_first(struct stream *s, unsigned char cmd)
{
struct xrdp_api_data *adp;
@ -385,7 +385,7 @@ drdynvc_process_data_first(struct stream *s, unsigned char cmd)
return 0;
}
static int APP_CC
static int
drdynvc_process_data(struct stream *s, unsigned char cmd)
{
struct xrdp_api_data *adp;
@ -425,7 +425,7 @@ drdynvc_process_data(struct stream *s, unsigned char cmd)
*
* @return 0 on success, -1 on failure
******************************************************************************/
int APP_CC
int
drdynvc_data_in(struct stream *s, int chan_id, int chan_flags, int length,
int total_length)
{
@ -473,7 +473,7 @@ drdynvc_data_in(struct stream *s, int chan_id, int chan_flags, int length,
* @return 1 for short insertion
* @return 2 for uint32_t insertions
******************************************************************************/
static int APP_CC
static int
drdynvc_insert_uint_124(struct stream *s, uint32_t val)
{
int ret_val;
@ -504,7 +504,7 @@ drdynvc_insert_uint_124(struct stream *s, uint32_t val)
* @param cmd first byte in stream
* @param chan_id return channel id here
******************************************************************************/
static int APP_CC
static int
drdynvc_get_chan_id(struct stream *s, char cmd, uint32_t *chan_id_p)
{
int cbChId;

View File

@ -56,12 +56,12 @@
#define CMD_DVC_CLOSE_CHANNEL 0x40
#define CMD_DVC_CAPABILITY 0x50
int APP_CC drdynvc_init(void);
int APP_CC drdynvc_send_open_channel_request(int chan_pri, unsigned int chan_id,
int drdynvc_init(void);
int drdynvc_send_open_channel_request(int chan_pri, unsigned int chan_id,
char *chan_name);
int APP_CC drdynvc_send_close_channel_request(unsigned int chan_id);
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 drdynvc_send_close_channel_request(unsigned int chan_id);
int drdynvc_write_data(uint32_t chan_id, char *data, int data_size);
int drdynvc_data_in(struct stream* s, int chan_id, int chan_flags,
int length, int total_length);
#endif

View File

@ -55,12 +55,12 @@ struct irp
void *user_data;
};
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);
IRP * devredir_irp_new(void);
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);
void devredir_irp_dump(void);
#endif /* end ifndef __IRP_H */

View File

@ -160,14 +160,14 @@ struct rail_window_data
#define RAIL_STYLE_DIALOG (0x80000000)
#define RAIL_EXT_STYLE_DIALOG (0x00040000)
static int APP_CC rail_win_get_state(Window win);
static int APP_CC rail_create_window(Window window_id, Window owner_id);
static int APP_CC rail_win_set_state(Window win, unsigned long state);
static int APP_CC rail_show_window(Window window_id, int show_state);
static int APP_CC rail_win_send_text(Window win);
static int rail_win_get_state(Window win);
static int rail_create_window(Window window_id, Window owner_id);
static int rail_win_set_state(Window win, unsigned long state);
static int rail_show_window(Window window_id, int show_state);
static int rail_win_send_text(Window win);
/*****************************************************************************/
static int APP_CC
static int
rail_send_key_esc(int window_id)
{
XEvent event;
@ -185,7 +185,7 @@ rail_send_key_esc(int window_id)
}
/*****************************************************************************/
static struct rail_window_data* APP_CC
static struct rail_window_data*
rail_get_window_data(Window window)
{
unsigned int bytes;
@ -219,7 +219,7 @@ rail_get_window_data(Window window)
}
/*****************************************************************************/
static int APP_CC
static int
rail_set_window_data(Window window, struct rail_window_data* rwd)
{
int bytes;
@ -232,7 +232,7 @@ rail_set_window_data(Window window, struct rail_window_data* rwd)
/*****************************************************************************/
/* get the rail window data, if not exist, try to create it and return */
static struct rail_window_data* APP_CC
static struct rail_window_data*
rail_get_window_data_safe(Window window)
{
struct rail_window_data* rv;
@ -249,7 +249,7 @@ rail_get_window_data_safe(Window window)
}
/******************************************************************************/
static int APP_CC
static int
is_window_valid_child_of_root(unsigned int window_id)
{
int found;
@ -276,7 +276,7 @@ is_window_valid_child_of_root(unsigned int window_id)
}
/*****************************************************************************/
static int APP_CC
static int
rail_send_init(void)
{
struct stream *s;
@ -301,7 +301,7 @@ rail_send_init(void)
}
/******************************************************************************/
static int DEFAULT_CC
static int
anotherWMRunning(Display *display, XErrorEvent *xe)
{
g_rail_running = 0;
@ -309,7 +309,7 @@ anotherWMRunning(Display *display, XErrorEvent *xe)
}
/******************************************************************************/
static int APP_CC
static int
rail_is_another_wm_running(void)
{
XErrorHandler old;
@ -334,7 +334,7 @@ rail_is_another_wm_running(void)
}
/*****************************************************************************/
int APP_CC
int
rail_init(void)
{
LOG(10, ("chansrv::rail_init:"));
@ -344,7 +344,7 @@ rail_init(void)
}
/*****************************************************************************/
int APP_CC
int
rail_deinit(void)
{
if (g_rail_up)
@ -359,7 +359,7 @@ rail_deinit(void)
return 0;
}
int APP_CC
int
rail_startup(void)
{
int dummy;
@ -406,7 +406,7 @@ rail_startup(void)
}
/*****************************************************************************/
static char *APP_CC
static char *
read_uni(struct stream *s, int num_chars)
{
twchar *rchrs;
@ -442,7 +442,7 @@ read_uni(struct stream *s, int num_chars)
}
/*****************************************************************************/
static int APP_CC
static int
rail_process_exec(struct stream *s, int size)
{
int flags;
@ -487,7 +487,7 @@ rail_process_exec(struct stream *s, int size)
}
/******************************************************************************/
static int APP_CC
static int
rail_win_popdown(void)
{
int rv = 0;
@ -523,7 +523,7 @@ rail_win_popdown(void)
}
/******************************************************************************/
static int APP_CC
static int
rail_close_window(int window_id)
{
XEvent ce;
@ -546,7 +546,7 @@ rail_close_window(int window_id)
}
/*****************************************************************************/
void DEFAULT_CC
void
my_timeout(void* data)
{
LOG(10, ("my_timeout: g_got_focus %d", g_got_focus));
@ -558,7 +558,7 @@ my_timeout(void* data)
}
/*****************************************************************************/
static int APP_CC
static int
rail_process_activate(struct stream *s, int size)
{
unsigned int window_id;
@ -636,7 +636,7 @@ rail_select_input(Window window_id)
}
/*****************************************************************************/
static int APP_CC
static int
rail_restore_windows(void)
{
unsigned int i;
@ -667,7 +667,7 @@ rail_restore_windows(void)
}
/*****************************************************************************/
static int APP_CC
static int
rail_process_system_param(struct stream *s, int size)
{
int system_param;
@ -689,7 +689,7 @@ rail_process_system_param(struct stream *s, int size)
}
/*****************************************************************************/
static int APP_CC
static int
rail_get_property(Display* display, Window target, Atom type, Atom property,
unsigned char** data, unsigned long* count)
{
@ -729,7 +729,7 @@ rail_get_property(Display* display, Window target, Atom type, Atom property,
}
/*****************************************************************************/
static int APP_CC
static int
rail_win_get_state(Window win)
{
unsigned long nitems = 0;
@ -751,7 +751,7 @@ rail_win_get_state(Window win)
}
/*****************************************************************************/
static int APP_CC
static int
rail_win_set_state(Window win, unsigned long state)
{
int old_state;
@ -777,7 +777,7 @@ rail_win_set_state(Window win, unsigned long state)
/*****************************************************************************/
/* *data pointer that needs g_free */
static int APP_CC
static int
rail_win_get_text(Window win, char **data)
{
int ret = 0;
@ -816,7 +816,7 @@ rail_win_get_text(Window win, char **data)
}
/******************************************************************************/
static int APP_CC
static int
rail_minmax_window(int window_id, int max)
{
LOG(10, ("chansrv::rail_minmax_window 0x%8.8x:", window_id));
@ -835,7 +835,7 @@ rail_minmax_window(int window_id, int max)
}
/*****************************************************************************/
static int APP_CC
static int
rail_restore_window(int window_id)
{
XWindowAttributes window_attributes;
@ -855,7 +855,7 @@ rail_restore_window(int window_id)
}
/*****************************************************************************/
static int APP_CC
static int
rail_process_system_command(struct stream *s, int size)
{
int window_id;
@ -913,7 +913,7 @@ rail_process_system_command(struct stream *s, int size)
}
/*****************************************************************************/
static int APP_CC
static int
rail_process_handshake(struct stream *s, int size)
{
int build_number;
@ -925,7 +925,7 @@ rail_process_handshake(struct stream *s, int size)
}
/*****************************************************************************/
static int APP_CC
static int
rail_process_notify_event(struct stream *s, int size)
{
int window_id;
@ -942,7 +942,7 @@ rail_process_notify_event(struct stream *s, int size)
}
/*****************************************************************************/
static int APP_CC
static int
rail_process_window_move(struct stream *s, int size)
{
int window_id;
@ -978,7 +978,7 @@ rail_process_window_move(struct stream *s, int size)
}
/*****************************************************************************/
static int APP_CC
static int
rail_process_local_move_size(struct stream *s, int size)
{
int window_id;
@ -1004,7 +1004,7 @@ rail_process_local_move_size(struct stream *s, int size)
/*****************************************************************************/
/* server to client only */
static int APP_CC
static int
rail_process_min_max_info(struct stream *s, int size)
{
LOG(10, ("chansrv::rail_process_min_max_info:"));
@ -1012,7 +1012,7 @@ rail_process_min_max_info(struct stream *s, int size)
}
/*****************************************************************************/
static int APP_CC
static int
rail_process_client_status(struct stream *s, int size)
{
int flags;
@ -1024,7 +1024,7 @@ rail_process_client_status(struct stream *s, int size)
}
/*****************************************************************************/
static int APP_CC
static int
rail_process_sys_menu(struct stream *s, int size)
{
int window_id;
@ -1043,7 +1043,7 @@ rail_process_sys_menu(struct stream *s, int size)
}
/*****************************************************************************/
static int APP_CC
static int
rail_process_lang_bar_info(struct stream *s, int size)
{
int language_bar_status;
@ -1055,7 +1055,7 @@ rail_process_lang_bar_info(struct stream *s, int size)
}
/*****************************************************************************/
static int APP_CC
static int
rail_process_appid_req(struct stream *s, int size)
{
LOG(10, ("chansrv::rail_process_appid_req:"));
@ -1063,7 +1063,7 @@ rail_process_appid_req(struct stream *s, int size)
}
/*****************************************************************************/
static int APP_CC
static int
rail_process_appid_resp(struct stream *s, int size)
{
LOG(10, ("chansrv::rail_process_appid_resp:"));
@ -1072,7 +1072,7 @@ rail_process_appid_resp(struct stream *s, int size)
/*****************************************************************************/
/* server to client only */
static int APP_CC
static int
rail_process_exec_result(struct stream *s, int size)
{
LOG(10, ("chansrv::rail_process_exec_result:"));
@ -1081,7 +1081,7 @@ rail_process_exec_result(struct stream *s, int size)
/*****************************************************************************/
/* data in from client ( client -> xrdp -> chansrv ) */
int APP_CC
int
rail_data_in(struct stream *s, int chan_id, int chan_flags, int length,
int total_length)
{
@ -1222,7 +1222,7 @@ get_string_crc(const char* text)
/*****************************************************************************/
/* returns 0, event handled, 1 unhandled */
static int APP_CC
static int
rail_win_send_text(Window win)
{
char* data = 0;
@ -1285,7 +1285,7 @@ rail_win_send_text(Window win)
}
/*****************************************************************************/
static int APP_CC
static int
rail_destroy_window(Window window_id)
{
struct stream *s;
@ -1304,7 +1304,7 @@ rail_destroy_window(Window window_id)
}
/*****************************************************************************/
static int APP_CC
static int
rail_show_window(Window window_id, int show_state)
{
int flags;
@ -1326,7 +1326,7 @@ rail_show_window(Window window_id, int show_state)
}
/*****************************************************************************/
static int APP_CC
static int
rail_create_window(Window window_id, Window owner_id)
{
int x;
@ -1487,7 +1487,7 @@ rail_create_window(Window window_id, Window owner_id)
/*****************************************************************************/
/* returns 0, event handled, 1 unhandled */
int APP_CC
int
rail_configure_request_window(XConfigureRequestEvent* config)
{
int num_window_rects = 1;
@ -1692,7 +1692,7 @@ rail_configure_request_window(XConfigureRequestEvent* config)
/*****************************************************************************/
/* returns 0, event handled, 1 unhandled */
int APP_CC
int
rail_configure_window(XConfigureEvent *config)
{
int num_window_rects = 1;
@ -1784,7 +1784,7 @@ rail_desktop_resize(XEvent *lxevent)
/*****************************************************************************/
/* returns 0, event handled, 1 unhandled */
int APP_CC
int
rail_xevent(void *xevent)
{
XEvent *lxevent;

View File

@ -23,15 +23,15 @@
#include "arch.h"
#include "parse.h"
int APP_CC
int
rail_init(void);
int APP_CC
int
rail_deinit(void);
int APP_CC
int
rail_data_in(struct stream* s, int chan_id, int chan_flags,
int length, int total_length);
int APP_CC
int
rail_xevent(void* xevent);
int APP_CC rail_request_title(int window_id);
int rail_request_title(int window_id);
#endif

View File

@ -163,129 +163,129 @@ extern int g_rdpdr_chan_id; /* in chansrv.c */
/******************************************************************************
** static functions local to this file **
******************************************************************************/
static struct stream * APP_CC scard_make_new_ioctl(IRP *irp, tui32 ioctl);
static int APP_CC scard_add_new_device(tui32 device_id);
static int APP_CC scard_get_free_slot(void);
static void APP_CC scard_release_resources(void);
static void APP_CC scard_send_EstablishContext(IRP *irp, int scope);
static void APP_CC scard_send_ReleaseContext(IRP *irp,
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(void);
static void scard_release_resources(void);
static void scard_send_EstablishContext(IRP *irp, int scope);
static void scard_send_ReleaseContext(IRP *irp,
char *context, int context_bytes);
static void APP_CC scard_send_IsContextValid(IRP* irp,
static void scard_send_IsContextValid(IRP* irp,
char *context, int context_bytes);
static void APP_CC scard_send_ListReaders(IRP *irp,
static void scard_send_ListReaders(IRP *irp,
char *context, int context_bytes,
char *groups, int cchReaders,
int wide);
static void APP_CC scard_send_GetStatusChange(IRP *irp,
static void scard_send_GetStatusChange(IRP *irp,
char *context, int context_bytes,
int wide,
tui32 timeout, tui32 num_readers,
READER_STATE *rsa);
static void APP_CC scard_send_Connect(IRP *irp,
static void scard_send_Connect(IRP *irp,
char *context, int context_bytes,
int wide,
READER_STATE *rs);
static void APP_CC scard_send_Reconnect(IRP *irp,
static void scard_send_Reconnect(IRP *irp,
char *context, int context_bytes,
char *card, int card_bytes,
READER_STATE *rs);
static void APP_CC scard_send_BeginTransaction(IRP *irp,
static void scard_send_BeginTransaction(IRP *irp,
char *context, int context_bytes,
char *card, int card_bytes);
static void APP_CC scard_send_EndTransaction(IRP *irp,
static void scard_send_EndTransaction(IRP *irp,
char *context, int context_bytes,
char *card, int card_bytes,
tui32 dwDisposition);
static void APP_CC scard_send_Status(IRP *irp, int wide,
static void scard_send_Status(IRP *irp, int wide,
char *context, int context_bytes,
char *card, int card_bytes,
int cchReaderLen, int cbAtrLen);
static void APP_CC scard_send_Disconnect(IRP *irp,
static void scard_send_Disconnect(IRP *irp,
char *context, int context_bytes,
char *card, int card_bytes,
int dwDisposition);
static int APP_CC scard_send_Transmit(IRP *irp,
static int scard_send_Transmit(IRP *irp,
char *context, int context_byte,
char *card, int card_bytes,
char *send_data, int send_bytes,
int recv_bytes,
struct xrdp_scard_io_request *send_ior,
struct xrdp_scard_io_request *recv_ior);
static int APP_CC scard_send_Control(IRP* irp, char *context, int context_bytes,
static int scard_send_Control(IRP* irp, char *context, int context_bytes,
char *card, int card_bytes,
char *send_data, int send_bytes,
int recv_bytes, int control_code);
static int APP_CC scard_send_Cancel(IRP *irp, char *context, int context_bytes);
static int APP_CC scard_send_GetAttrib(IRP *irp, char *card, int card_bytes,
static int scard_send_Cancel(IRP *irp, char *context, int context_bytes);
static int scard_send_GetAttrib(IRP *irp, char *card, int card_bytes,
READER_STATE *rs);
/******************************************************************************
** local callbacks into this module **
******************************************************************************/
static void APP_CC scard_handle_EstablishContext_Return(struct stream *s, IRP *irp,
static void scard_handle_EstablishContext_Return(struct stream *s, IRP *irp,
tui32 DeviceId, tui32 CompletionId,
tui32 IoStatus);
static void APP_CC scard_handle_ReleaseContext_Return(struct stream *s, IRP *irp,
static void scard_handle_ReleaseContext_Return(struct stream *s, IRP *irp,
tui32 DeviceId, tui32 CompletionId,
tui32 IoStatus);
static void APP_CC scard_handle_IsContextValid_Return(struct stream *s, IRP *irp,
static void scard_handle_IsContextValid_Return(struct stream *s, IRP *irp,
tui32 DeviceId, tui32 CompletionId,
tui32 IoStatus);
static void APP_CC scard_handle_ListReaders_Return(struct stream *s, IRP *irp,
static void scard_handle_ListReaders_Return(struct stream *s, IRP *irp,
tui32 DeviceId, tui32 CompletionId,
tui32 IoStatus);
static void APP_CC scard_handle_GetStatusChange_Return(struct stream *s, IRP *irp,
static void scard_handle_GetStatusChange_Return(struct stream *s, IRP *irp,
tui32 DeviceId, tui32 CompletionId,
tui32 IoStatus);
static void APP_CC scard_handle_Connect_Return(struct stream *s, IRP *irp,
static void scard_handle_Connect_Return(struct stream *s, IRP *irp,
tui32 DeviceId, tui32 CompletionId,
tui32 IoStatus);
static void APP_CC scard_handle_Reconnect_Return(struct stream *s, IRP *irp,
static void scard_handle_Reconnect_Return(struct stream *s, IRP *irp,
tui32 DeviceId, tui32 CompletionId,
tui32 IoStatus);
static void APP_CC scard_handle_BeginTransaction_Return(struct stream *s, IRP *irp,
static void scard_handle_BeginTransaction_Return(struct stream *s, IRP *irp,
tui32 DeviceId, tui32 CompletionId,
tui32 IoStatus);
static void APP_CC scard_handle_EndTransaction_Return(struct stream *s, IRP *irp,
static void scard_handle_EndTransaction_Return(struct stream *s, IRP *irp,
tui32 DeviceId,
tui32 CompletionId,
tui32 IoStatus);
static void APP_CC scard_handle_Status_Return(struct stream *s, IRP *irp,
static void scard_handle_Status_Return(struct stream *s, IRP *irp,
tui32 DeviceId, tui32 CompletionId,
tui32 IoStatus);
static void APP_CC scard_handle_Disconnect_Return(struct stream *s, IRP *irp,
static void scard_handle_Disconnect_Return(struct stream *s, IRP *irp,
tui32 DeviceId, tui32 CompletionId,
tui32 IoStatus);
static void APP_CC scard_handle_Transmit_Return(struct stream *s, IRP *irp,
static void scard_handle_Transmit_Return(struct stream *s, IRP *irp,
tui32 DeviceId,
tui32 CompletionId,
tui32 IoStatus);
static void APP_CC scard_handle_Control_Return(struct stream *s, IRP *irp,
static void scard_handle_Control_Return(struct stream *s, IRP *irp,
tui32 DeviceId,
tui32 CompletionId,
tui32 IoStatus);
static void APP_CC scard_handle_Cancel_Return(struct stream *s, IRP *irp,
static void scard_handle_Cancel_Return(struct stream *s, IRP *irp,
tui32 DeviceId,
tui32 CompletionId,
tui32 IoStatus);
static void APP_CC scard_handle_GetAttrib_Return(struct stream *s, IRP *irp,
static void scard_handle_GetAttrib_Return(struct stream *s, IRP *irp,
tui32 DeviceId,
tui32 CompletionId,
tui32 IoStatus);
@ -298,7 +298,7 @@ static void APP_CC scard_handle_GetAttrib_Return(struct stream *s, IRP *irp,
/**
*****************************************************************************/
void APP_CC
void
scard_device_announce(tui32 device_id)
{
log_debug("entered: device_id=%d", device_id);
@ -323,7 +323,7 @@ scard_device_announce(tui32 device_id)
/**
*
*****************************************************************************/
int APP_CC
int
scard_get_wait_objs(tbus *objs, int *count, int *timeout)
{
return scard_pcsc_get_wait_objs(objs, count, timeout);
@ -332,7 +332,7 @@ scard_get_wait_objs(tbus *objs, int *count, int *timeout)
/**
*
*****************************************************************************/
int APP_CC
int
scard_check_wait_objs(void)
{
return scard_pcsc_check_wait_objs();
@ -341,7 +341,7 @@ scard_check_wait_objs(void)
/**
*
*****************************************************************************/
int APP_CC
int
scard_init(void)
{
LOG(0, ("scard_init:"));
@ -351,7 +351,7 @@ scard_init(void)
/**
*
*****************************************************************************/
int APP_CC
int
scard_deinit(void)
{
LOG(0, ("scard_deinit:"));
@ -364,7 +364,7 @@ scard_deinit(void)
/**
*
*****************************************************************************/
int APP_CC
int
scard_send_establish_context(void *user_data, int scope)
{
IRP *irp;
@ -391,7 +391,7 @@ scard_send_establish_context(void *user_data, int scope)
/**
* Release a previously established Smart Card context
*****************************************************************************/
int APP_CC
int
scard_send_release_context(void *user_data,
char *context, int context_bytes)
{
@ -419,7 +419,7 @@ scard_send_release_context(void *user_data,
/**
* Checks if a previously established context is still valid
*****************************************************************************/
int APP_CC
int
scard_send_is_valid_context(void *user_data, char *context, int context_bytes)
{
IRP *irp;
@ -446,7 +446,7 @@ scard_send_is_valid_context(void *user_data, char *context, int context_bytes)
/**
*
*****************************************************************************/
int APP_CC
int
scard_send_list_readers(void *user_data, char *context, int context_bytes,
char *groups, int cchReaders, int wide)
{
@ -480,7 +480,7 @@ scard_send_list_readers(void *user_data, char *context, int context_bytes,
* @param num_readers number of entries in rsa
* @param rsa array of READER_STATEs
*****************************************************************************/
int APP_CC
int
scard_send_get_status_change(void *user_data, char *context, int context_bytes,
int wide, tui32 timeout, tui32 num_readers,
READER_STATE* rsa)
@ -513,7 +513,7 @@ scard_send_get_status_change(void *user_data, char *context, int context_bytes,
* @param con connection to client
* @param wide TRUE if unicode string
*****************************************************************************/
int APP_CC
int
scard_send_connect(void *user_data, char *context, int context_bytes,
int wide, READER_STATE* rs)
{
@ -549,7 +549,7 @@ scard_send_connect(void *user_data, char *context, int context_bytes,
* rs.preferred_protocol
* rs.init_type
*****************************************************************************/
int APP_CC
int
scard_send_reconnect(void *user_data, char *context, int context_bytes,
char *card, int card_bytes, READER_STATE* rs)
{
@ -580,7 +580,7 @@ scard_send_reconnect(void *user_data, char *context, int context_bytes,
*
* @param con connection to client
*****************************************************************************/
int APP_CC
int
scard_send_begin_transaction(void *user_data, char *context, int context_bytes,
char *card, int card_bytes)
{
@ -612,7 +612,7 @@ scard_send_begin_transaction(void *user_data, char *context, int context_bytes,
* @param con connection to client
* @param sc_handle handle to smartcard
*****************************************************************************/
int APP_CC
int
scard_send_end_transaction(void *user_data, char *context, int context_bytes,
char *card, int card_bytes,
tui32 dwDisposition)
@ -645,7 +645,7 @@ scard_send_end_transaction(void *user_data, char *context, int context_bytes,
* @param con connection to client
* @param wide TRUE if unicode string
*****************************************************************************/
int APP_CC
int
scard_send_status(void *user_data, int wide, char *context, int context_bytes,
char *card, int card_bytes,
int cchReaderLen, int cbAtrLen)
@ -678,7 +678,7 @@ scard_send_status(void *user_data, int wide, char *context, int context_bytes,
* @param con connection to client
* @param sc_handle handle to smartcard
*****************************************************************************/
int APP_CC
int
scard_send_disconnect(void *user_data, char *context, int context_bytes,
char *card, int card_bytes, int dwDisposition)
{
@ -708,7 +708,7 @@ scard_send_disconnect(void *user_data, char *context, int context_bytes,
* The Transmit_Call structure is used to send data to the smart card
* associated with a valid context.
*****************************************************************************/
int APP_CC
int
scard_send_transmit(void *user_data, char *context, int context_bytes,
char *card, int card_bytes,
char *send_data, int send_bytes, int recv_bytes,
@ -741,7 +741,7 @@ scard_send_transmit(void *user_data, char *context, int context_bytes,
/**
* Communicate directly with the smart card reader
*****************************************************************************/
int APP_CC
int
scard_send_control(void *user_data, char* context, int context_bytes,
char *card, int card_bytes,
char *send_data, int send_bytes,
@ -774,7 +774,7 @@ scard_send_control(void *user_data, char* context, int context_bytes,
/**
* Cancel any outstanding calls
*****************************************************************************/
int APP_CC
int
scard_send_cancel(void *user_data, char *context, int context_bytes)
{
IRP *irp;
@ -801,7 +801,7 @@ scard_send_cancel(void *user_data, char *context, int context_bytes)
/**
* Get reader attributes
*****************************************************************************/
int APP_CC
int
scard_send_get_attrib(void *user_data, char *card, int card_bytes,
READER_STATE* rs)
{
@ -840,7 +840,7 @@ scard_send_get_attrib(void *user_data, char *card, int card_bytes,
*
* @return stream with IOCTL inserted in it, NULL on error
*****************************************************************************/
static struct stream * APP_CC
static struct stream *
scard_make_new_ioctl(IRP *irp, tui32 ioctl)
{
/*
@ -892,7 +892,7 @@ scard_make_new_ioctl(IRP *irp, tui32 ioctl)
*
* @return index into smartcards[] on success, -1 on failure
*****************************************************************************/
static int APP_CC
static int
scard_add_new_device(tui32 device_id)
{
int index;
@ -923,7 +923,7 @@ scard_add_new_device(tui32 device_id)
* @return index of first unused entry in smartcards or -1 if smartcards
* is full
*****************************************************************************/
static int APP_CC
static int
scard_get_free_slot(void)
{
int i;
@ -944,7 +944,7 @@ scard_get_free_slot(void)
/**
* Release resources prior to shutting down
*****************************************************************************/
static void APP_CC
static void
scard_release_resources(void)
{
int i;
@ -962,7 +962,7 @@ scard_release_resources(void)
/**
*
*****************************************************************************/
static void APP_CC
static void
scard_send_EstablishContext(IRP *irp, int scope)
{
struct stream *s;
@ -1002,7 +1002,7 @@ scard_send_EstablishContext(IRP *irp, int scope)
/**
* Release a previously established Smart Card context
*****************************************************************************/
static void APP_CC
static void
scard_send_ReleaseContext(IRP *irp, char *context, int context_bytes)
{
/* see [MS-RDPESC] 3.1.4.2 */
@ -1053,7 +1053,7 @@ scard_send_ReleaseContext(IRP *irp, char *context, int context_bytes)
/**
* Checks if a previously established context is still valid
*****************************************************************************/
static void APP_CC
static void
scard_send_IsContextValid(IRP *irp, char *context, int context_bytes)
{
/* see [MS-RDPESC] 3.1.4.3 */
@ -1115,7 +1115,7 @@ scard_send_IsContextValid(IRP *irp, char *context, int context_bytes)
/**
*
*****************************************************************************/
static void APP_CC
static void
scard_send_ListReaders(IRP *irp, char *context, int context_bytes,
char *groups, int cchReaders, int wide)
{
@ -1247,7 +1247,7 @@ align_s(struct stream *s, int bytes)
* @param num_readers number of entries in rsa
* @param rsa array of READER_STATEs
*****************************************************************************/
static void APP_CC
static void
scard_send_GetStatusChange(IRP* irp, char *context, int context_bytes,
int wide, tui32 timeout,
tui32 num_readers, READER_STATE* rsa)
@ -1378,7 +1378,7 @@ scard_send_GetStatusChange(IRP* irp, char *context, int context_bytes,
* @param wide TRUE if unicode string
* @param rs reader state
*****************************************************************************/
static void APP_CC
static void
scard_send_Connect(IRP* irp, char *context, int context_bytes,
int wide, READER_STATE* rs)
{
@ -1475,7 +1475,7 @@ scard_send_Connect(IRP* irp, char *context, int context_bytes,
* rs.preferred_protocol
* rs.init_type
*****************************************************************************/
static void APP_CC
static void
scard_send_Reconnect(IRP *irp, char *context, int context_bytes,
char *card, int card_bytes, READER_STATE *rs)
{
@ -1546,7 +1546,7 @@ scard_send_Reconnect(IRP *irp, char *context, int context_bytes,
*
* @param con connection to client
*****************************************************************************/
static void APP_CC
static void
scard_send_BeginTransaction(IRP *irp, char *context, int context_bytes,
char *card, int card_bytes)
{
@ -1613,7 +1613,7 @@ scard_send_BeginTransaction(IRP *irp, char *context, int context_bytes,
* @param con connection to client
* @param sc_handle handle to smartcard
*****************************************************************************/
static void APP_CC
static void
scard_send_EndTransaction(IRP *irp, char *context, int context_bytes,
char *card, int card_bytes,
tui32 dwDisposition)
@ -1680,7 +1680,7 @@ scard_send_EndTransaction(IRP *irp, char *context, int context_bytes,
* @param con connection to client
* @param wide TRUE if unicode string
*****************************************************************************/
static void APP_CC
static void
scard_send_Status(IRP *irp, int wide, char *context, int context_bytes,
char *card, int card_bytes,
int cchReaderLen, int cbAtrLen)
@ -1768,7 +1768,7 @@ scard_send_Status(IRP *irp, int wide, char *context, int context_bytes,
* @param con connection to client
* @param sc_handle handle to smartcard
*****************************************************************************/
static void APP_CC
static void
scard_send_Disconnect(IRP *irp, char *context, int context_bytes,
char *card, int card_bytes, int dwDisposition)
{
@ -1832,7 +1832,7 @@ scard_send_Disconnect(IRP *irp, char *context, int context_bytes,
* The Transmit_Call structure is used to send data to the smart card
* associated with a valid context.
*****************************************************************************/
static int APP_CC
static int
scard_send_Transmit(IRP *irp, char *context, int context_bytes,
char *card, int card_bytes, char *send_data,
int send_bytes, int recv_bytes,
@ -2025,7 +2025,7 @@ scard_send_Transmit(IRP *irp, char *context, int context_bytes,
/**
* Communicate directly with the smart card reader
*****************************************************************************/
static int APP_CC
static int
scard_send_Control(IRP *irp, char *context, int context_bytes,
char *card, int card_bytes, char *send_data,
int send_bytes, int recv_bytes, int control_code)
@ -2101,7 +2101,7 @@ scard_send_Control(IRP *irp, char *context, int context_bytes,
/**
* Cancel any outstanding calls
*****************************************************************************/
static int APP_CC
static int
scard_send_Cancel(IRP *irp, char *context, int context_bytes)
{
/* see [MS-RDPESC] 3.1.4.27 */
@ -2153,7 +2153,7 @@ scard_send_Cancel(IRP *irp, char *context, int context_bytes)
/**
* Get reader attributes
*****************************************************************************/
static int APP_CC
static int
scard_send_GetAttrib(IRP *irp, char *card, int card_bytes, READER_STATE *rs)
{
/* see [MS-RDPESC] 2.2.2.21 */
@ -2223,7 +2223,7 @@ scard_send_GetAttrib(IRP *irp, char *card, int card_bytes, READER_STATE *rs)
/**
*
*****************************************************************************/
static void APP_CC
static void
scard_handle_EstablishContext_Return(struct stream *s, IRP *irp,
tui32 DeviceId, tui32 CompletionId,
tui32 IoStatus)
@ -2272,9 +2272,9 @@ scard_handle_ReleaseContext_Return(struct stream *s, IRP *irp,
*
*****************************************************************************/
static void
APP_CC scard_handle_IsContextValid_Return(struct stream *s, IRP *irp,
tui32 DeviceId, tui32 CompletionId,
tui32 IoStatus)
scard_handle_IsContextValid_Return(struct stream *s, IRP *irp,
tui32 DeviceId, tui32 CompletionId,
tui32 IoStatus)
{
tui32 len;
@ -2297,7 +2297,7 @@ APP_CC scard_handle_IsContextValid_Return(struct stream *s, IRP *irp,
/**
*
*****************************************************************************/
static void APP_CC
static void
scard_handle_ListReaders_Return(struct stream *s, IRP *irp,
tui32 DeviceId, tui32 CompletionId,
tui32 IoStatus)
@ -2373,7 +2373,7 @@ scard_handle_Connect_Return(struct stream *s, IRP *irp,
/**
*
*****************************************************************************/
static void APP_CC
static void
scard_handle_Reconnect_Return(struct stream *s, IRP *irp,
tui32 DeviceId, tui32 CompletionId,
tui32 IoStatus)
@ -2503,7 +2503,7 @@ scard_handle_Disconnect_Return(struct stream *s, IRP *irp,
/**
*
*****************************************************************************/
static void APP_CC
static void
scard_handle_Transmit_Return(struct stream *s, IRP *irp, tui32 DeviceId,
tui32 CompletionId, tui32 IoStatus)
{
@ -2528,7 +2528,7 @@ scard_handle_Transmit_Return(struct stream *s, IRP *irp, tui32 DeviceId,
/**
*
*****************************************************************************/
static void APP_CC
static void
scard_handle_Control_Return(struct stream *s, IRP *irp, tui32 DeviceId,
tui32 CompletionId,tui32 IoStatus)
{
@ -2553,7 +2553,7 @@ scard_handle_Control_Return(struct stream *s, IRP *irp, tui32 DeviceId,
/**
*
*****************************************************************************/
static void APP_CC
static void
scard_handle_Cancel_Return(struct stream *s, IRP *irp, tui32 DeviceId,
tui32 CompletionId, tui32 IoStatus)
{
@ -2578,7 +2578,7 @@ scard_handle_Cancel_Return(struct stream *s, IRP *irp, tui32 DeviceId,
/**
*
*****************************************************************************/
static void APP_CC
static void
scard_handle_GetAttrib_Return(struct stream *s, IRP *irp, tui32 DeviceId,
tui32 CompletionId, tui32 IoStatus)
{

View File

@ -106,66 +106,66 @@ typedef struct reader_state
} READER_STATE;
void scard_device_announce(tui32 device_id);
int APP_CC scard_get_wait_objs(tbus *objs, int *count, int *timeout);
int APP_CC scard_check_wait_objs(void);
int APP_CC scard_init(void);
int APP_CC scard_deinit(void);
int APP_CC scard_send_establish_context(void *user_data, int scope);
int APP_CC scard_send_release_context(void *user_data,
int scard_get_wait_objs(tbus *objs, int *count, int *timeout);
int scard_check_wait_objs(void);
int scard_init(void);
int scard_deinit(void);
int scard_send_establish_context(void *user_data, int scope);
int scard_send_release_context(void *user_data,
char *context, int context_bytes);
int APP_CC scard_send_is_valid_context(void *user_data,
int scard_send_is_valid_context(void *user_data,
char *context, int context_bytes);
int APP_CC scard_send_list_readers(void *user_data,
int scard_send_list_readers(void *user_data,
char *context, int context_bytes,
char *groups, int cchReaders, int wide);
int APP_CC scard_send_get_status_change(void *user_data,
int scard_send_get_status_change(void *user_data,
char *context, int context_bytes,
int wide, tui32 timeout,
tui32 num_readers, READER_STATE* rsa);
int APP_CC scard_send_connect(void *user_data,
int scard_send_connect(void *user_data,
char *context, int context_bytes, int wide,
READER_STATE* rs);
int APP_CC scard_send_reconnect(void *user_data,
int scard_send_reconnect(void *user_data,
char *context, int context_bytes,
char *card, int card_bytes,
READER_STATE* rs);
int APP_CC scard_send_begin_transaction(void *user_data,
int scard_send_begin_transaction(void *user_data,
char *context, int context_bytes,
char *card, int card_bytes);
int APP_CC scard_send_end_transaction(void *user_data,
int scard_send_end_transaction(void *user_data,
char *context, int context_bytes,
char *card, int card_bytes,
tui32 dwDisposition);
int APP_CC scard_send_status(void *user_data, int wide,
int scard_send_status(void *user_data, int wide,
char *context, int context_bytes,
char *card, int card_bytes,
int cchReaderLen, int cbAtrLen);
int APP_CC scard_send_disconnect(void *user_data,
int scard_send_disconnect(void *user_data,
char *context, int context_bytes,
char *card, int card_bytes,
int dwDisposition);
int APP_CC scard_send_transmit(void *user_data,
int scard_send_transmit(void *user_data,
char *context, int context_bytes,
char *card, int card_bytes,
char *send_data, int send_bytes, int recv_bytes,
struct xrdp_scard_io_request *send_ior,
struct xrdp_scard_io_request *recv_ior);
int APP_CC scard_send_control(void *user_data,
int scard_send_control(void *user_data,
char *context, int context_bytes,
char *card, int card_bytes,
char *send_data, int send_bytes,
int recv_bytes, int control_code);
int APP_CC scard_send_cancel(void *user_data,
int scard_send_cancel(void *user_data,
char *context, int context_bytes);
int APP_CC scard_send_get_attrib(void *user_data, char *card, int card_bytes,
int scard_send_get_attrib(void *user_data, char *card, int card_bytes,
READER_STATE* rs);
/*

View File

@ -367,7 +367,7 @@ context_add_card(struct pcsc_uds_client *uds_client,
}
/*****************************************************************************/
int APP_CC
int
scard_pcsc_get_wait_objs(tbus *objs, int *count, int *timeout)
{
struct pcsc_uds_client *uds_client;
@ -394,7 +394,7 @@ scard_pcsc_get_wait_objs(tbus *objs, int *count, int *timeout)
}
/*****************************************************************************/
int APP_CC
int
scard_pcsc_check_wait_objs(void)
{
struct pcsc_uds_client *uds_client;
@ -432,7 +432,7 @@ scard_pcsc_check_wait_objs(void)
/*****************************************************************************/
/* returns error */
int APP_CC
int
scard_process_establish_context(struct trans *con, struct stream *in_s)
{
int dwScope;
@ -450,7 +450,7 @@ scard_process_establish_context(struct trans *con, struct stream *in_s)
/*****************************************************************************/
/* returns error */
int APP_CC
int
scard_function_establish_context_return(void *user_data,
struct stream *in_s,
int len, int status)
@ -511,7 +511,7 @@ scard_function_establish_context_return(void *user_data,
/*****************************************************************************/
/* returns error */
int APP_CC
int
scard_process_release_context(struct trans *con, struct stream *in_s)
{
int hContext;
@ -539,7 +539,7 @@ scard_process_release_context(struct trans *con, struct stream *in_s)
/*****************************************************************************/
/* returns error */
int APP_CC
int
scard_function_release_context_return(void *user_data,
struct stream *in_s,
int len, int status)
@ -582,7 +582,7 @@ struct pcsc_list_readers
/*****************************************************************************/
/* returns error */
int APP_CC
int
scard_process_list_readers(struct trans *con, struct stream *in_s)
{
int hContext;
@ -620,7 +620,7 @@ scard_process_list_readers(struct trans *con, struct stream *in_s)
}
/*****************************************************************************/
int APP_CC
int
scard_function_list_readers_return(void *user_data,
struct stream *in_s,
int len, int status)
@ -726,7 +726,7 @@ scard_function_list_readers_return(void *user_data,
/*****************************************************************************/
/* returns error */
int APP_CC
int
scard_process_connect(struct trans *con, struct stream *in_s)
{
int hContext;
@ -760,7 +760,7 @@ scard_process_connect(struct trans *con, struct stream *in_s)
}
/*****************************************************************************/
int APP_CC
int
scard_function_connect_return(void *user_data,
struct stream *in_s,
int len, int status)
@ -824,7 +824,7 @@ scard_function_connect_return(void *user_data,
/*****************************************************************************/
/* returns error */
int APP_CC
int
scard_process_disconnect(struct trans *con, struct stream *in_s)
{
int hCard;
@ -853,7 +853,7 @@ scard_process_disconnect(struct trans *con, struct stream *in_s)
}
/*****************************************************************************/
int APP_CC
int
scard_function_disconnect_return(void *user_data,
struct stream *in_s,
int len, int status)
@ -889,7 +889,7 @@ scard_function_disconnect_return(void *user_data,
/*****************************************************************************/
/* returns error */
int APP_CC
int
scard_process_begin_transaction(struct trans *con, struct stream *in_s)
{
int hCard;
@ -918,7 +918,7 @@ scard_process_begin_transaction(struct trans *con, struct stream *in_s)
/*****************************************************************************/
/* returns error */
int APP_CC
int
scard_function_begin_transaction_return(void *user_data,
struct stream *in_s,
int len, int status)
@ -954,7 +954,7 @@ scard_function_begin_transaction_return(void *user_data,
/*****************************************************************************/
/* returns error */
int APP_CC
int
scard_process_end_transaction(struct trans *con, struct stream *in_s)
{
int hCard;
@ -986,7 +986,7 @@ scard_process_end_transaction(struct trans *con, struct stream *in_s)
/*****************************************************************************/
/* returns error */
int APP_CC
int
scard_function_end_transaction_return(void *user_data,
struct stream *in_s,
int len, int status)
@ -1023,7 +1023,7 @@ scard_function_end_transaction_return(void *user_data,
/*****************************************************************************/
/* returns error */
int APP_CC
int
scard_function_get_attrib_return(void *user_data,
struct stream *in_s,
int len, int status)
@ -1041,7 +1041,7 @@ struct pcsc_transmit
/*****************************************************************************/
/* returns error */
int APP_CC
int
scard_process_transmit(struct trans *con, struct stream *in_s)
{
int hCard;
@ -1099,7 +1099,7 @@ scard_process_transmit(struct trans *con, struct stream *in_s)
/*****************************************************************************/
/* returns error */
int APP_CC
int
scard_function_transmit_return(void *user_data,
struct stream *in_s,
int len, int status)
@ -1178,7 +1178,7 @@ scard_function_transmit_return(void *user_data,
/*****************************************************************************/
/* returns error */
int APP_CC
int
scard_process_control(struct trans *con, struct stream *in_s)
{
int hCard;
@ -1219,7 +1219,7 @@ scard_process_control(struct trans *con, struct stream *in_s)
/*****************************************************************************/
/* returns error */
int APP_CC
int
scard_function_control_return(void *user_data,
struct stream *in_s,
int len, int status)
@ -1275,7 +1275,7 @@ struct pcsc_status
/*****************************************************************************/
/* returns error */
int APP_CC
int
scard_process_status(struct trans *con, struct stream *in_s)
{
int hCard;
@ -1336,7 +1336,7 @@ static int g_ms2pc[] = { PC_SCARD_UNKNOWN, PC_SCARD_ABSENT,
/*****************************************************************************/
/* returns error */
int APP_CC
int
scard_function_status_return(void *user_data,
struct stream *in_s,
int len, int status)
@ -1444,7 +1444,7 @@ scard_function_status_return(void *user_data,
/*****************************************************************************/
/* returns error */
int APP_CC
int
scard_process_get_status_change(struct trans *con, struct stream *in_s)
{
int index;
@ -1506,7 +1506,7 @@ scard_process_get_status_change(struct trans *con, struct stream *in_s)
}
/*****************************************************************************/
int APP_CC
int
scard_function_get_status_change_return(void *user_data,
struct stream *in_s,
int len, int status)
@ -1576,7 +1576,7 @@ scard_function_get_status_change_return(void *user_data,
/*****************************************************************************/
/* returns error */
int APP_CC
int
scard_process_cancel(struct trans *con, struct stream *in_s)
{
int hContext;
@ -1602,7 +1602,7 @@ scard_process_cancel(struct trans *con, struct stream *in_s)
/*****************************************************************************/
/* returns error */
int APP_CC
int
scard_function_cancel_return(void *user_data,
struct stream *in_s,
int len, int status)
@ -1638,7 +1638,7 @@ scard_function_cancel_return(void *user_data,
/*****************************************************************************/
/* returns error */
int APP_CC
int
scard_function_is_context_valid_return(void *user_data,
struct stream *in_s,
int len, int status)
@ -1648,7 +1648,7 @@ scard_function_is_context_valid_return(void *user_data,
/*****************************************************************************/
/* returns error */
int APP_CC scard_function_reconnect_return(void *user_data,
int scard_function_reconnect_return(void *user_data,
struct stream *in_s,
int len, int status)
{
@ -1657,7 +1657,7 @@ int APP_CC scard_function_reconnect_return(void *user_data,
/*****************************************************************************/
/* returns error */
int APP_CC
int
scard_process_msg(struct trans *con, struct stream *in_s, int command)
{
int rv;
@ -1751,7 +1751,7 @@ scard_process_msg(struct trans *con, struct stream *in_s, int command)
/*****************************************************************************/
/* returns error */
int DEFAULT_CC
int
my_pcsc_trans_data_in(struct trans *trans)
{
struct stream *s;
@ -1778,7 +1778,7 @@ my_pcsc_trans_data_in(struct trans *trans)
/*****************************************************************************/
/* got a new connection from libpcsclite */
int DEFAULT_CC
int
my_pcsc_trans_conn_in(struct trans *trans, struct trans *new_trans)
{
struct pcsc_uds_client *uds_client;
@ -1818,7 +1818,7 @@ my_pcsc_trans_conn_in(struct trans *trans, struct trans *new_trans)
}
/*****************************************************************************/
int APP_CC
int
scard_pcsc_init(void)
{
char *home;
@ -1865,7 +1865,7 @@ scard_pcsc_init(void)
}
/*****************************************************************************/
int APP_CC
int
scard_pcsc_deinit(void)
{
LLOGLN(0, ("scard_pcsc_deinit:"));
@ -1891,22 +1891,22 @@ scard_pcsc_deinit(void)
#else
int APP_CC
int
scard_pcsc_get_wait_objs(tbus *objs, int *count, int *timeout)
{
return 0;
}
int APP_CC
int
scard_pcsc_check_wait_objs(void)
{
return 0;
}
int APP_CC
int
scard_pcsc_init(void)
{
return 0;
}
int APP_CC
int
scard_pcsc_deinit(void)
{
return 0;

View File

@ -24,65 +24,65 @@
#ifndef _SMARTCARD_PCSC_H
#define _SMARTCARD_PCSC_H
int APP_CC scard_pcsc_get_wait_objs(tbus *objs, int *count, int *timeout);
int APP_CC scard_pcsc_check_wait_objs(void);
int APP_CC scard_pcsc_init(void);
int APP_CC scard_pcsc_deinit(void);
int APP_CC scard_function_establish_context_return(void *user_data,
int scard_pcsc_get_wait_objs(tbus *objs, int *count, int *timeout);
int scard_pcsc_check_wait_objs(void);
int scard_pcsc_init(void);
int scard_pcsc_deinit(void);
int scard_function_establish_context_return(void *user_data,
struct stream *in_s,
int len, int status);
int APP_CC scard_function_release_context_return(void *user_data,
int scard_function_release_context_return(void *user_data,
struct stream *in_s,
int len, int status);
int APP_CC scard_function_list_readers_return(void *user_data,
int scard_function_list_readers_return(void *user_data,
struct stream *in_s,
int len, int status);
int APP_CC scard_function_transmit_return(void *user_data,
int scard_function_transmit_return(void *user_data,
struct stream *in_s,
int len, int status);
int APP_CC scard_function_control_return(void *user_data,
int scard_function_control_return(void *user_data,
struct stream *in_s,
int len, int status);
int APP_CC scard_function_get_status_change_return(void *user_data,
int scard_function_get_status_change_return(void *user_data,
struct stream *in_s,
int len, int status);
int APP_CC scard_function_connect_return(void *user_data,
int scard_function_connect_return(void *user_data,
struct stream *in_s,
int len, int status);
int APP_CC scard_function_status_return(void *user_data,
int scard_function_status_return(void *user_data,
struct stream *in_s,
int len, int status);
int APP_CC scard_function_begin_transaction_return(void *user_data,
int scard_function_begin_transaction_return(void *user_data,
struct stream *in_s,
int len, int status);
int APP_CC scard_function_end_transaction_return(void *user_data,
int scard_function_end_transaction_return(void *user_data,
struct stream *in_s,
int len, int status);
int APP_CC scard_function_is_context_valid_return(void *user_data,
int scard_function_is_context_valid_return(void *user_data,
struct stream *in_s,
int len, int status);
int APP_CC scard_function_reconnect_return(void *user_data,
int scard_function_reconnect_return(void *user_data,
struct stream *in_s,
int len, int status);
int APP_CC scard_function_disconnect_return(void *user_data,
int scard_function_disconnect_return(void *user_data,
struct stream *in_s,
int len, int status);
int APP_CC scard_function_cancel_return(void *user_data,
int scard_function_cancel_return(void *user_data,
struct stream *in_s,
int len, int status);
int APP_CC scard_function_get_attrib_return(void *user_data,
int scard_function_get_attrib_return(void *user_data,
struct stream *in_s,
int len, int status);

View File

@ -206,21 +206,21 @@ static int g_client_input_format_index = 0;
static int g_server_input_format_index = 0;
/* microphone related */
static int APP_CC sound_send_server_input_formats(void);
static int APP_CC sound_process_input_format(int aindex, int wFormatTag,
static int sound_send_server_input_formats(void);
static int sound_process_input_format(int aindex, int wFormatTag,
int nChannels, int nSamplesPerSec,
int nAvgBytesPerSec, int nBlockAlign,
int wBitsPerSample, int cbSize, char *data);
static int APP_CC sound_process_input_formats(struct stream *s, int size);
static int APP_CC sound_input_start_recording(void);
static int APP_CC sound_input_stop_recording(void);
static int APP_CC sound_process_input_data(struct stream *s, int bytes);
static int DEFAULT_CC sound_sndsrvr_source_data_in(struct trans *trans);
static int APP_CC sound_start_source_listener(void);
static int APP_CC sound_start_sink_listener(void);
static int sound_process_input_formats(struct stream *s, int size);
static int sound_input_start_recording(void);
static int sound_input_stop_recording(void);
static int sound_process_input_data(struct stream *s, int bytes);
static int sound_sndsrvr_source_data_in(struct trans *trans);
static int sound_start_source_listener(void);
static int sound_start_sink_listener(void);
/*****************************************************************************/
static int APP_CC
static int
sound_send_server_output_formats(void)
{
struct stream *s;
@ -322,7 +322,7 @@ sound_send_training(void)
}
/*****************************************************************************/
static int APP_CC
static int
sound_process_output_format(int aindex, int wFormatTag, int nChannels,
int nSamplesPerSec, int nAvgBytesPerSec,
int nBlockAlign, int wBitsPerSample,
@ -391,7 +391,7 @@ sound_process_output_format(int aindex, int wFormatTag, int nChannels,
0020 10 b1 02 00 04 00 10 00 00 00
*/
static int APP_CC
static int
sound_process_output_formats(struct stream *s, int size)
{
int num_formats;
@ -780,7 +780,7 @@ sound_send_close(void)
/*****************************************************************************/
/* from client */
static int APP_CC
static int
sound_process_training(struct stream *s, int size)
{
int time_diff;
@ -792,7 +792,7 @@ sound_process_training(struct stream *s, int size)
/*****************************************************************************/
/* from client */
static int APP_CC
static int
sound_process_wave_confirm(struct stream *s, int size)
{
int wTimeStamp;
@ -816,7 +816,7 @@ sound_process_wave_confirm(struct stream *s, int size)
/*****************************************************************************/
/* process message in from the audio source, eg pulse, alsa
on it's way to the client. returns error */
static int APP_CC
static int
process_pcm_message(int id, int size, struct stream *s)
{
switch (id)
@ -838,7 +838,7 @@ process_pcm_message(int id, int size, struct stream *s)
/* data in from sound_server_sink */
static int DEFAULT_CC
static int
sound_sndsrvr_sink_data_in(struct trans *trans)
{
struct stream *s;
@ -879,7 +879,7 @@ sound_sndsrvr_sink_data_in(struct trans *trans)
/* incoming connection on unix domain socket - sound_server_sink -> xrdp */
static int DEFAULT_CC
static int
sound_sndsrvr_sink_conn_in(struct trans *trans, struct trans *new_trans)
{
LOG(0, ("sound_sndsrvr_sink_conn_in:"));
@ -909,7 +909,7 @@ sound_sndsrvr_sink_conn_in(struct trans *trans, struct trans *new_trans)
/* incoming connection on unix domain socket - sound_server_source -> xrdp */
static int DEFAULT_CC
static int
sound_sndsrvr_source_conn_in(struct trans *trans, struct trans *new_trans)
{
LOG(0, ("sound_sndsrvr_source_conn_in: client connected"));
@ -936,7 +936,7 @@ sound_sndsrvr_source_conn_in(struct trans *trans, struct trans *new_trans)
}
/*****************************************************************************/
int APP_CC
int
sound_init(void)
{
LOG(0, ("sound_init:"));
@ -965,7 +965,7 @@ sound_init(void)
}
/*****************************************************************************/
int APP_CC
int
sound_deinit(void)
{
LOG(10, ("sound_deinit:"));
@ -1011,7 +1011,7 @@ sound_deinit(void)
/* data in from client ( client -> xrdp -> chansrv ) */
int APP_CC
int
sound_data_in(struct stream *s, int chan_id, int chan_flags, int length,
int total_length)
{
@ -1067,7 +1067,7 @@ sound_data_in(struct stream *s, int chan_id, int chan_flags, int length,
}
/*****************************************************************************/
int APP_CC
int
sound_get_wait_objs(tbus *objs, int *count, int *timeout)
{
int lcount;
@ -1103,7 +1103,7 @@ sound_get_wait_objs(tbus *objs, int *count, int *timeout)
}
/*****************************************************************************/
int APP_CC
int
sound_check_wait_objs(void)
{
if (g_audio_l_trans_out != 0)
@ -1161,7 +1161,7 @@ sound_check_wait_objs(void)
*
*****************************************************************************/
static int APP_CC
static int
sound_send_server_input_formats(void)
{
struct stream *s;
@ -1225,7 +1225,7 @@ sound_send_server_input_formats(void)
*
*****************************************************************************/
static int APP_CC
static int
sound_process_input_format(int aindex, int wFormatTag, int nChannels,
int nSamplesPerSec, int nAvgBytesPerSec,
int nBlockAlign, int wBitsPerSample,
@ -1273,7 +1273,7 @@ sound_process_input_format(int aindex, int wFormatTag, int nChannels,
*
*****************************************************************************/
static int APP_CC
static int
sound_process_input_formats(struct stream *s, int size)
{
int num_formats;
@ -1318,7 +1318,7 @@ sound_process_input_formats(struct stream *s, int size)
*
*****************************************************************************/
static int APP_CC
static int
sound_input_start_recording(void)
{
struct stream* s;
@ -1357,7 +1357,7 @@ sound_input_start_recording(void)
*
*****************************************************************************/
static int APP_CC
static int
sound_input_stop_recording(void)
{
struct stream* s;
@ -1387,7 +1387,7 @@ sound_input_stop_recording(void)
* Process data: xrdp <- client
*****************************************************************************/
static int APP_CC
static int
sound_process_input_data(struct stream *s, int bytes)
{
struct stream *ls;
@ -1415,7 +1415,7 @@ sound_process_input_data(struct stream *s, int bytes)
* Got a command from sound_server_source
*****************************************************************************/
static int DEFAULT_CC
static int
sound_sndsrvr_source_data_in(struct trans *trans)
{
struct stream *ts = NULL;
@ -1516,7 +1516,7 @@ sound_sndsrvr_source_data_in(struct trans *trans)
/**
* Start a listener for microphone redirection connections
*****************************************************************************/
static int APP_CC
static int
sound_start_source_listener(void)
{
char port[1024];
@ -1533,7 +1533,7 @@ sound_start_source_listener(void)
/**
* Start a listener for speaker redirection connections
*****************************************************************************/
static int APP_CC
static int
sound_start_sink_listener(void)
{
char port[1024];

View File

@ -50,12 +50,12 @@
#define PA_CMD_STOP_REC 2
#define PA_CMD_SEND_DATA 3
int APP_CC sound_init(void);
int APP_CC sound_deinit(void);
int APP_CC sound_get_wait_objs(tbus* objs, int* count, int* timeout);
int APP_CC sound_check_wait_objs(void);
int sound_init(void);
int sound_deinit(void);
int sound_get_wait_objs(tbus* objs, int* count, int* timeout);
int sound_check_wait_objs(void);
int APP_CC sound_data_in(struct stream* s, int chan_id, int chan_flags,
int sound_data_in(struct stream* s, int chan_id, int chan_flags,
int length, int total_length);
#endif

View File

@ -51,7 +51,7 @@ Atom g_net_wm_name = 0;
Atom g_wm_state = 0;
/*****************************************************************************/
static int DEFAULT_CC
static int
xcommon_error_handler(Display *dis, XErrorEvent *xer)
{
char text[256];
@ -68,7 +68,7 @@ xcommon_error_handler(Display *dis, XErrorEvent *xer)
Do any cleanup that needs to be done on exit, like removing temporary files.
Don't worry about memory leaks */
#if 0
static int DEFAULT_CC
static int
xcommon_fatal_handler(Display *dis)
{
return 0;
@ -80,7 +80,7 @@ xcommon_fatal_handler(Display *dis)
this is like g_time2 in os_calls, but not milliseconds since machine was
up, something else
this is a time value similar to what the xserver uses */
int APP_CC
int
xcommon_get_local_time(void)
{
return g_time3();
@ -88,7 +88,7 @@ xcommon_get_local_time(void)
/******************************************************************************/
/* this should be called first */
int APP_CC
int
xcommon_init(void)
{
if (g_display != 0)
@ -139,7 +139,7 @@ xcommon_init(void)
/* returns error
this is called to get any wait objects for the main loop
timeout can be nil */
int APP_CC
int
xcommon_get_wait_objs(tbus *objs, int *count, int *timeout)
{
int lcount;
@ -156,7 +156,7 @@ xcommon_get_wait_objs(tbus *objs, int *count, int *timeout)
}
/*****************************************************************************/
int APP_CC
int
xcommon_check_wait_objs(void)
{
XEvent xevent;

View File

@ -26,13 +26,13 @@
#define FORMAT_TO_BYTES(_format) \
(_format) == 32 ? sizeof(long) : (_format) / 8
int APP_CC
int
xcommon_get_local_time(void);
int APP_CC
int
xcommon_init(void);
int APP_CC
int
xcommon_get_wait_objs(tbus* objs, int* count, int* timeout);
int APP_CC
int
xcommon_check_wait_objs(void);
#endif

View File

@ -39,7 +39,7 @@ extern struct config_sesman *g_cfg; /* in sesman.c */
/******************************************************************************/
int DEFAULT_CC
int
config_read(struct config_sesman *cfg)
{
int fd;
@ -103,7 +103,7 @@ config_read(struct config_sesman *cfg)
}
/******************************************************************************/
int DEFAULT_CC
int
config_read_globals(int file, struct config_sesman *cf, struct list *param_n,
struct list *param_v)
{
@ -187,7 +187,7 @@ config_read_globals(int file, struct config_sesman *cf, struct list *param_n,
}
/******************************************************************************/
int DEFAULT_CC
int
config_read_security(int file, struct config_security *sc,
struct list *param_n,
struct list *param_v)
@ -272,7 +272,7 @@ config_read_security(int file, struct config_security *sc,
}
/******************************************************************************/
int DEFAULT_CC
int
config_read_sessions(int file, struct config_sessions *se, struct list *param_n,
struct list *param_v)
{
@ -368,7 +368,7 @@ config_read_sessions(int file, struct config_sessions *se, struct list *param_n,
}
/******************************************************************************/
int DEFAULT_CC
int
config_read_rdp_params(int file, struct config_sesman *cs, struct list *param_n,
struct list *param_v)
{
@ -399,7 +399,7 @@ config_read_rdp_params(int file, struct config_sesman *cs, struct list *param_n,
}
/******************************************************************************/
int DEFAULT_CC
int
config_read_xorg_params(int file, struct config_sesman *cs,
struct list *param_n, struct list *param_v)
{
@ -432,7 +432,7 @@ config_read_xorg_params(int file, struct config_sesman *cs,
}
/******************************************************************************/
int DEFAULT_CC
int
config_read_vnc_params(int file, struct config_sesman *cs, struct list *param_n,
struct list *param_v)
{
@ -463,7 +463,7 @@ config_read_vnc_params(int file, struct config_sesman *cs, struct list *param_n,
}
/******************************************************************************/
int DEFAULT_CC
int
config_read_session_variables(int file, struct config_sesman *cs,
struct list *param_n, struct list *param_v)
{

View File

@ -251,7 +251,7 @@ struct config_sesman
* @return 0 on success, 1 on failure
*
*/
int DEFAULT_CC
int
config_read(struct config_sesman* cfg);
/**
@ -264,7 +264,7 @@ config_read(struct config_sesman* cfg);
* @return 0 on success, 1 on failure
*
*/
int DEFAULT_CC
int
config_read_globals(int file, struct config_sesman* cf,
struct list* param_n, struct list* param_v);
@ -278,7 +278,7 @@ config_read_globals(int file, struct config_sesman* cf,
* @return 0 on success, 1 on failure
*
*/
int DEFAULT_CC
int
config_read_logging(int file, struct log_config* lc, struct list* param_n,
struct list* param_v);
@ -292,7 +292,7 @@ config_read_logging(int file, struct log_config* lc, struct list* param_n,
* @return 0 on success, 1 on failure
*
*/
int DEFAULT_CC
int
config_read_security(int file, struct config_security* sc,
struct list* param_n, struct list* param_v);
@ -306,7 +306,7 @@ config_read_security(int file, struct config_security* sc,
* @return 0 on success, 1 on failure
*
*/
int DEFAULT_CC
int
config_read_sessions(int file, struct config_sessions* ss,
struct list* param_n, struct list* param_v);
@ -320,7 +320,7 @@ config_read_sessions(int file, struct config_sessions* ss,
* @return 0 on success, 1 on failure
*
*/
int DEFAULT_CC
int
config_read_rdp_params(int file, struct config_sesman* cs, struct list* param_n,
struct list* param_v);
@ -334,7 +334,7 @@ config_read_rdp_params(int file, struct config_sesman* cs, struct list* param_n,
* @return 0 on success, 1 on failure
*
*/
int DEFAULT_CC
int
config_read_xorg_params(int file, struct config_sesman* cs, struct list* param_n,
struct list* param_v);
@ -348,11 +348,11 @@ config_read_xorg_params(int file, struct config_sesman* cs, struct list* param_n
* @return 0 on success, 1 on failure
*
*/
int DEFAULT_CC
int
config_read_vnc_params(int file, struct config_sesman* cs, struct list* param_n,
struct list* param_v);
int DEFAULT_CC
int
config_read_session_variables(int file, struct config_sesman *cs,
struct list *param_n, struct list *param_v);

View File

@ -38,7 +38,7 @@ extern unsigned char g_fixedkey[8]; /* in sesman.c */
extern struct config_sesman *g_cfg; /* in sesman.c */
/******************************************************************************/
int DEFAULT_CC
int
env_check_password_file(const char *filename, const char *passwd)
{
char encryptedPasswd[16];
@ -87,7 +87,7 @@ env_check_password_file(const char *filename, const char *passwd)
/******************************************************************************/
/* its the responsibility of the caller to free passwd_file */
int DEFAULT_CC
int
env_set_user(const char *username, char **passwd_file, int display,
const struct list *env_names, const struct list *env_values)
{

View File

@ -37,7 +37,7 @@
* @return 0 on success, 1 on error
*
*/
int DEFAULT_CC
int
env_check_password_file(const char *filename, const char *password);
/**
@ -49,7 +49,7 @@ env_check_password_file(const char *filename, const char *password);
* @return 0 on success, g_getuser_info() error codes on error
*
*/
int DEFAULT_CC
int
env_set_user(const char *username, char **passwd_file, int display,
const struct list *env_names, const struct list *env_values);

View File

@ -33,7 +33,7 @@
//struct log_config* s_log;
/* server API */
int DEFAULT_CC
int
scp_init(void)
{
/*

View File

@ -40,7 +40,7 @@
* It this memory needs to be g_free()d
*
*/
int DEFAULT_CC
int
scp_init(void);
#endif

View File

@ -36,7 +36,7 @@ int lock_fork_forkers_count; /* threads that want to fork */
int lock_fork_blockers_count; /* threads that are blocking fork */
int lock_fork_waiting_count; /* threads suspended until the fork finishes */
void DEFAULT_CC
void
scp_lock_init(void)
{
/* initializing fork lock */
@ -53,7 +53,7 @@ scp_lock_init(void)
}
/******************************************************************************/
void DEFAULT_CC
void
scp_lock_fork_request(void)
{
/* lock mutex */
@ -73,7 +73,7 @@ scp_lock_fork_request(void)
}
/******************************************************************************/
void DEFAULT_CC
void
scp_lock_fork_release(void)
{
pthread_mutex_lock(&lock_fork);
@ -95,7 +95,7 @@ scp_lock_fork_release(void)
}
/******************************************************************************/
void DEFAULT_CC
void
scp_lock_fork_critical_section_end(int blocking)
{
//LOG_DBG("lock_fork_critical_section_end()",0);
@ -118,7 +118,7 @@ scp_lock_fork_critical_section_end(int blocking)
}
/******************************************************************************/
int DEFAULT_CC
int
scp_lock_fork_critical_section_start(void)
{
//LOG_DBG("lock_fork_critical_section_start()",0);

View File

@ -29,7 +29,7 @@
* @brief initializes all the locks
*
*/
void DEFAULT_CC
void
scp_lock_init(void);
/**
@ -37,7 +37,7 @@ scp_lock_init(void);
* @brief requires to fork a new child process
*
*/
void DEFAULT_CC
void
scp_lock_fork_request(void);
/**
@ -45,7 +45,7 @@ scp_lock_fork_request(void);
* @brief releases a fork() request
*
*/
void DEFAULT_CC
void
scp_lock_fork_release(void);
/**
@ -59,7 +59,7 @@ scp_lock_fork_release(void);
* @return
*
*/
int DEFAULT_CC
int
scp_lock_fork_critical_section_start(void);
/**
@ -67,7 +67,7 @@ scp_lock_fork_critical_section_start(void);
* @brief closes the critical section
*
*/
void DEFAULT_CC
void
scp_lock_fork_critical_section_end(int blocking);
#endif

View File

@ -33,7 +33,7 @@
extern struct log_config *s_log;
/*****************************************************************************/
int DEFAULT_CC
int
scp_tcp_force_recv(int sck, char *data, int len)
{
int rcvd;
@ -76,7 +76,7 @@ scp_tcp_force_recv(int sck, char *data, int len)
}
/*****************************************************************************/
int DEFAULT_CC
int
scp_tcp_force_send(int sck, char *data, int len)
{
int sent;
@ -119,7 +119,7 @@ scp_tcp_force_send(int sck, char *data, int len)
}
/*****************************************************************************/
int DEFAULT_CC
int
scp_tcp_bind(int sck, char *addr, char *port)
{
return g_tcp_bind_address(sck, port, addr);

View File

@ -38,7 +38,7 @@
* @return 0 on success, 1 on error
*
*/
int DEFAULT_CC
int
scp_tcp_force_recv(int sck, char* data, int len);
/**
@ -50,7 +50,7 @@ scp_tcp_force_recv(int sck, char* data, int len);
* @return 0 on success, 1 on error
*
*/
int DEFAULT_CC
int
scp_tcp_force_send(int sck, char* data, int len);
/**
@ -62,7 +62,7 @@ scp_tcp_force_send(int sck, char* data, int len);
* @return 0 on success, -1 on error
*
*/
int DEFAULT_CC
int
scp_tcp_bind(int sck, char* addr, char* port);
#endif

View File

@ -36,7 +36,7 @@
extern struct config_sesman *g_cfg; /* in sesman.c */
/******************************************************************************/
void *DEFAULT_CC
void *
scp_process_start(void *sck)
{
struct SCP_CONNECTION scon;

View File

@ -39,7 +39,7 @@
* @param socket the connection socket
*
*/
void* DEFAULT_CC
void*
scp_process_start(void* sck);
#endif

View File

@ -33,7 +33,7 @@
extern struct config_sesman *g_cfg; /* in sesman.c */
/******************************************************************************/
void DEFAULT_CC
void
scp_v0_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s)
{
int display = 0;

View File

@ -37,7 +37,7 @@
* @param out_s output stream
*
*/
void DEFAULT_CC
void
scp_v0_process(struct SCP_CONNECTION* c, struct SCP_SESSION* s);
#endif

View File

@ -38,7 +38,7 @@ extern struct config_sesman *g_cfg; /* in sesman.c */
static void parseCommonStates(enum SCP_SERVER_STATES_E e, const char *f);
/******************************************************************************/
void DEFAULT_CC
void
scp_v1_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s)
{
long data;

View File

@ -35,7 +35,7 @@
* @param out_s output stream
*
*/
void DEFAULT_CC
void
scp_v1_process(struct SCP_CONNECTION* c, struct SCP_SESSION* s);
#endif

View File

@ -37,7 +37,7 @@ extern struct config_sesman *g_cfg; /* in sesman.c */
static void parseCommonStates(enum SCP_SERVER_STATES_E e, const char *f);
/******************************************************************************/
void DEFAULT_CC
void
scp_v1_mng_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s)
{
long data;

View File

@ -35,7 +35,7 @@
* @param out_s output stream
*
*/
void DEFAULT_CC
void
scp_v1_mng_process(struct SCP_CONNECTION* c, struct SCP_SESSION* s);
#endif

View File

@ -43,7 +43,7 @@ tintptr g_term_event = 0;
* @brief Starts sesman main loop
*
*/
static void DEFAULT_CC
static void
sesman_main_loop(void)
{
int in_sck;
@ -148,7 +148,7 @@ print_usage(int retcode)
}
/******************************************************************************/
int DEFAULT_CC
int
main(int argc, char **argv)
{
int fd;

View File

@ -61,7 +61,7 @@ extern tbus g_term_event; /* in sesman.c */
* @param len the allocated len for outstr
* @return
*/
char *APP_CC
char *
dumpItemsToString(struct list *self, char *outstr, int len)
{
int index;
@ -90,7 +90,7 @@ dumpItemsToString(struct list *self, char *outstr, int len)
/******************************************************************************/
struct session_item *DEFAULT_CC
struct session_item *
session_get_bydata(const char *name, int width, int height, int bpp, int type,
const char *client_ip)
{
@ -163,7 +163,7 @@ session_get_bydata(const char *name, int width, int height, int bpp, int type,
* @return 0 if there isn't a display running, nonzero otherwise
*
*/
static int DEFAULT_CC
static int
x_server_running_check_ports(int display)
{
char text[256];
@ -250,7 +250,7 @@ x_server_running_check_ports(int display)
* @return 0 if there isn't a display running, nonzero otherwise
*
*/
static int DEFAULT_CC
static int
x_server_running(int display)
{
char text[256];
@ -269,7 +269,7 @@ x_server_running(int display)
}
/******************************************************************************/
static void DEFAULT_CC
static void
session_start_sessvc(int xpid, int wmpid, long data, char *username, int display)
{
struct list *sessvc_params = (struct list *)NULL;
@ -342,7 +342,7 @@ session_start_sessvc(int xpid, int wmpid, long data, char *username, int display
/******************************************************************************/
/* called with the main thread
returns boolean */
static int APP_CC
static int
session_is_display_in_chain(int display)
{
struct session_chain *chain;
@ -367,7 +367,7 @@ session_is_display_in_chain(int display)
/******************************************************************************/
/* called with the main thread */
static int APP_CC
static int
session_get_avail_display_from_chain(void)
{
int display;
@ -392,7 +392,7 @@ session_get_avail_display_from_chain(void)
}
/******************************************************************************/
static int APP_CC
static int
wait_for_xserver(int display)
{
int i;
@ -421,7 +421,7 @@ wait_for_xserver(int display)
/******************************************************************************/
/* called with the main thread */
static int APP_CC
static int
session_start_fork(tbus data, tui8 type, struct SCP_SESSION *s)
{
int display = 0;
@ -876,7 +876,7 @@ session_start_fork(tbus data, tui8 type, struct SCP_SESSION *s)
/******************************************************************************/
/* called with the main thread */
static int APP_CC
static int
session_reconnect_fork(int display, char *username)
{
int pid;
@ -910,7 +910,7 @@ session_reconnect_fork(int display, char *username)
/******************************************************************************/
/* called by a worker thread, ask the main thread to call session_sync_start
and wait till done */
int DEFAULT_CC
int
session_start(long data, tui8 type, struct SCP_SESSION *s)
{
return session_start_fork(data, type, s);
@ -919,14 +919,14 @@ session_start(long data, tui8 type, struct SCP_SESSION *s)
/******************************************************************************/
/* called by a worker thread, ask the main thread to call session_sync_start
and wait till done */
int DEFAULT_CC
int
session_reconnect(int display, char *username)
{
return session_reconnect_fork(display, username);
}
/******************************************************************************/
int DEFAULT_CC
int
session_kill(int pid)
{
struct session_chain *tmp;
@ -987,7 +987,7 @@ session_kill(int pid)
}
/******************************************************************************/
void DEFAULT_CC
void
session_sigkill_all(void)
{
struct session_chain *tmp;
@ -1012,7 +1012,7 @@ session_sigkill_all(void)
}
/******************************************************************************/
struct session_item *DEFAULT_CC
struct session_item *
session_get_bypid(int pid)
{
struct session_chain *tmp;

View File

@ -91,7 +91,7 @@ struct session_chain
* @return session data or 0
*
*/
struct session_item* DEFAULT_CC
struct session_item*
session_get_bydata(const char *name, int width, int height, int bpp, int type,
const char *client_ip);
#ifndef session_find_item
@ -104,10 +104,10 @@ session_get_bydata(const char *name, int width, int height, int bpp, int type,
* @return 0 on error, display number if success
*
*/
int DEFAULT_CC
int
session_start(long data, tui8 type, struct SCP_SESSION *s);
int DEFAULT_CC
int
session_reconnect(int display, char* username);
/**
@ -117,7 +117,7 @@ session_reconnect(int display, char* username);
* @return
*
*/
int DEFAULT_CC
int
session_kill(int pid);
/**
@ -126,7 +126,7 @@ session_kill(int pid);
* @return
*
*/
void DEFAULT_CC
void
session_sigkill_all(void);
/**
@ -136,7 +136,7 @@ session_sigkill_all(void);
* @return a pointer to the session descriptor on success, NULL otherwise
*
*/
struct session_item* DEFAULT_CC
struct session_item*
session_get_bypid(int pid);
/**

View File

@ -34,7 +34,7 @@
static int g_term = 0;
/*****************************************************************************/
void DEFAULT_CC
void
term_signal_handler(int sig)
{
g_writeln("xrdp-sessvc: term_signal_handler: got signal %d", sig);
@ -42,7 +42,7 @@ term_signal_handler(int sig)
}
/*****************************************************************************/
void DEFAULT_CC
void
nil_signal_handler(int sig)
{
g_writeln("xrdp-sessvc: nil_signal_handler: got signal %d", sig);
@ -50,7 +50,7 @@ nil_signal_handler(int sig)
/******************************************************************************/
/* chansrv can exit at any time without cleaning up, it's an xlib app */
int APP_CC
int
chansrv_cleanup(int pid)
{
char text[256];
@ -73,7 +73,7 @@ chansrv_cleanup(int pid)
}
/******************************************************************************/
int DEFAULT_CC
int
main(int argc, char **argv)
{
int ret = 0;

View File

@ -38,7 +38,7 @@ extern struct config_sesman *g_cfg; /* in sesman.c */
extern tbus g_term_event;
/******************************************************************************/
void DEFAULT_CC
void
sig_sesman_shutdown(int sig)
{
char pid_file[256];
@ -62,7 +62,7 @@ sig_sesman_shutdown(int sig)
}
/******************************************************************************/
void DEFAULT_CC
void
sig_sesman_reload_cfg(int sig)
{
int error;
@ -125,7 +125,7 @@ sig_sesman_reload_cfg(int sig)
}
/******************************************************************************/
void DEFAULT_CC
void
sig_sesman_session_end(int sig)
{
int pid;
@ -144,7 +144,7 @@ sig_sesman_session_end(int sig)
}
/******************************************************************************/
void *DEFAULT_CC
void *
sig_handler_thread(void *arg)
{
int recv_signal;

View File

@ -33,7 +33,7 @@
* @param sig The received signal
*
*/
void DEFAULT_CC
void
sig_sesman_shutdown(int sig);
/**
@ -42,7 +42,7 @@ sig_sesman_shutdown(int sig);
* @param sig The received signal
*
*/
void DEFAULT_CC
void
sig_sesman_reload_cfg(int sig);
/**
@ -51,7 +51,7 @@ sig_sesman_reload_cfg(int sig);
* @param sig The received signal
*
*/
void DEFAULT_CC
void
sig_sesman_session_end(int sig);
/**
@ -59,7 +59,7 @@ sig_sesman_session_end(int sig);
* @brief signal handling thread
*
*/
void* DEFAULT_CC
void*
sig_handler_thread(void* arg);
#endif

View File

@ -34,7 +34,7 @@
struct config_sesman g_cfg; /* config.h */
/******************************************************************************/
int DEFAULT_CC
int
main(int argc, char **argv)
{
int sck;

View File

@ -37,7 +37,7 @@
#include <string.h>
/*****************************************************************************/
int DEFAULT_CC
int
tcp_force_recv(int sck, char *data, int len)
{
int rcvd;
@ -87,7 +87,7 @@ tcp_force_recv(int sck, char *data, int len)
}
/*****************************************************************************/
int DEFAULT_CC
int
tcp_force_send(int sck, char *data, int len)
{
int sent;
@ -137,7 +137,7 @@ tcp_force_send(int sck, char *data, int len)
}
/*****************************************************************************/
int DEFAULT_CC
int
tcp_bind(int sck, char *addr, char *port)
{
struct sockaddr_in s;

View File

@ -36,7 +36,7 @@
* @return 0 on success, 1 on error
*
*/
int DEFAULT_CC
int
tcp_force_recv(int sck, char* data, int len);
/**
@ -48,7 +48,7 @@ tcp_force_recv(int sck, char* data, int len);
* @return 0 on success, 1 on error
*
*/
int DEFAULT_CC
int
tcp_force_send(int sck, char* data, int len);
/**
@ -60,7 +60,7 @@ tcp_force_send(int sck, char* data, int len);
* @return 0 on success, -1 on error
*
*/
int DEFAULT_CC
int
tcp_bind(int sck, char* addr, char* port);
#endif

View File

@ -43,15 +43,15 @@
extern struct config_sesman *g_cfg; /* in sesman.c */
static int DEFAULT_CC
static int
auth_crypt_pwd(const char *pwd, const char *pln, char *crp);
static int DEFAULT_CC
static int
auth_account_disabled(struct spwd *stp);
/******************************************************************************/
/* returns boolean */
long DEFAULT_CC
long
auth_userpass(const char *user, const char *pass, int *errorcode)
{
const char *encr;
@ -99,7 +99,7 @@ auth_userpass(const char *user, const char *pass, int *errorcode)
/******************************************************************************/
/* returns error */
int DEFAULT_CC
int
auth_start_session(long in_val, int in_display)
{
return 0;
@ -107,28 +107,28 @@ auth_start_session(long in_val, int in_display)
/******************************************************************************/
/* returns error */
int DEFAULT_CC
int
auth_stop_session(long in_val)
{
return 0;
}
/******************************************************************************/
int DEFAULT_CC
int
auth_end(long in_val)
{
return 0;
}
/******************************************************************************/
int DEFAULT_CC
int
auth_set_env(long in_val)
{
return 0;
}
/******************************************************************************/
int DEFAULT_CC
int
auth_check_pwd_chg(const char *user)
{
struct passwd *spw;
@ -185,7 +185,7 @@ auth_check_pwd_chg(const char *user)
return AUTH_PWD_CHG_OK;
}
int DEFAULT_CC
int
auth_change_pwd(const char *user, const char *newpwd)
{
struct passwd *spw;
@ -259,7 +259,7 @@ auth_change_pwd(const char *user, const char *newpwd)
*
*/
static int DEFAULT_CC
static int
auth_crypt_pwd(const char *pwd, const char *pln, char *crp)
{
char salt[13] = "$1$";
@ -299,7 +299,7 @@ auth_crypt_pwd(const char *pwd, const char *pln, char *crp)
* @return 1 if the account is disabled, 0 otherwise
*
*/
static int DEFAULT_CC
static int
auth_account_disabled(struct spwd *stp)
{
int today;

View File

@ -47,7 +47,7 @@ extern struct config_sesman* g_cfg; /* in sesman.c */
/******************************************************************************/
/* returns boolean */
long DEFAULT_CC
long
auth_userpass(const char *user, const char *pass, int *errorcode)
{
int ret = auth_userokay(user, NULL, "auth-xrdp", pass);
@ -56,40 +56,40 @@ auth_userpass(const char *user, const char *pass, int *errorcode)
/******************************************************************************/
/* returns error */
int DEFAULT_CC
int
auth_start_session(long in_val, int in_display)
{
return 0;
}
/******************************************************************************/
int DEFAULT_CC
int
auth_end(long in_val)
{
return 0;
}
/******************************************************************************/
int DEFAULT_CC
int
auth_set_env(long in_val)
{
return 0;
}
/******************************************************************************/
int DEFAULT_CC
int
auth_check_pwd_chg(const char *user)
{
return 0;
}
int DEFAULT_CC
int
auth_change_pwd(const char *user, const char *newpwd)
{
return 0;
}
int DEFAULT_CC
int
auth_stop_session(long in_val)
{
return 0;
@ -104,7 +104,7 @@ auth_stop_session(long in_val)
*
*/
static int DEFAULT_CC
static int
auth_crypt_pwd(const char *pwd, const char *pln, char *crp)
{
return 0;
@ -115,7 +115,7 @@ auth_crypt_pwd(const char *pwd, const char *pln, char *crp)
* @return 1 if the account is disabled, 0 otherwise
*
*/
static int DEFAULT_CC
static int
auth_account_disabled(struct spwd* stp)
{
return 0;

View File

@ -77,7 +77,7 @@ struct user_info
/******************************************************************************/
/* returns boolean */
static int DEFAULT_CC
static int
k5_begin(struct k_opts *opts, struct k5_data *k5, struct user_info *u_info)
{
krb5_error_code code = 0;
@ -168,7 +168,7 @@ k5_begin(struct k_opts *opts, struct k5_data *k5, struct user_info *u_info)
}
/******************************************************************************/
static void DEFAULT_CC
static void
k5_end(struct k5_data *k5)
{
if (k5->name)
@ -399,7 +399,7 @@ cleanup:
/******************************************************************************/
/* returns boolean */
int DEFAULT_CC
int
auth_userpass(const char *user, const char *pass, int *errorcode)
{
struct k_opts opts;
@ -428,7 +428,7 @@ auth_userpass(const char *user, const char *pass, int *errorcode)
/******************************************************************************/
/* returns error */
int DEFAULT_CC
int
auth_start_session(long in_val, int in_display)
{
return 0;
@ -436,21 +436,21 @@ auth_start_session(long in_val, int in_display)
/******************************************************************************/
/* returns error */
int DEFAULT_CC
int
auth_stop_session(long in_val)
{
return 0;
}
/******************************************************************************/
int DEFAULT_CC
int
auth_end(long in_val)
{
return 0;
}
/******************************************************************************/
int DEFAULT_CC
int
auth_set_env(long in_val)
{
return 0;

View File

@ -50,7 +50,7 @@ struct t_auth_info
};
/******************************************************************************/
static int DEFAULT_CC
static int
verify_pam_conv(int num_msg, const struct pam_message **msg,
struct pam_response **resp, void *appdata_ptr)
{
@ -86,7 +86,7 @@ verify_pam_conv(int num_msg, const struct pam_message **msg,
}
/******************************************************************************/
static void DEFAULT_CC
static void
get_service_name(char *service_name)
{
service_name[0] = 0;
@ -105,7 +105,7 @@ get_service_name(char *service_name)
/* returns long, zero is no go
Stores the detailed error code in the errorcode variable*/
long DEFAULT_CC
long
auth_userpass(const char *user, const char *pass, int *errorcode)
{
int error;
@ -179,7 +179,7 @@ auth_userpass(const char *user, const char *pass, int *errorcode)
/******************************************************************************/
/* returns error */
int DEFAULT_CC
int
auth_start_session(long in_val, int in_display)
{
struct t_auth_info *auth_info;
@ -220,7 +220,7 @@ auth_start_session(long in_val, int in_display)
/******************************************************************************/
/* returns error */
int DEFAULT_CC
int
auth_stop_session(long in_val)
{
struct t_auth_info *auth_info;
@ -241,7 +241,7 @@ auth_stop_session(long in_val)
/******************************************************************************/
/* returns error */
/* cleanup */
int DEFAULT_CC
int
auth_end(long in_val)
{
struct t_auth_info *auth_info;
@ -274,7 +274,7 @@ auth_end(long in_val)
/******************************************************************************/
/* returns error */
/* set any pam env vars */
int DEFAULT_CC
int
auth_set_env(long in_val)
{
struct t_auth_info *auth_info;

View File

@ -37,7 +37,7 @@
/******************************************************************************/
/* returns boolean */
int DEFAULT_CC
int
auth_userpass(const char *user, const char *pass, int *errorcode)
{
pam_handle_t *pamh;
@ -88,7 +88,7 @@ auth_userpass(const char *user, const char *pass, int *errorcode)
/******************************************************************************/
/* returns error */
int DEFAULT_CC
int
auth_start_session(long in_val, int in_display)
{
return 0;
@ -96,21 +96,21 @@ auth_start_session(long in_val, int in_display)
/******************************************************************************/
/* returns error */
int DEFAULT_CC
int
auth_stop_session(long in_val)
{
return 0;
}
/******************************************************************************/
int DEFAULT_CC
int
auth_end(long in_val)
{
return 0;
}
/******************************************************************************/
int DEFAULT_CC
int
auth_set_env(long in_val)
{
return 0;

Some files were not shown because too many files have changed in this diff Show More