diff options
Diffstat (limited to 'sesman')
60 files changed, 572 insertions, 572 deletions
diff --git a/sesman/access.c b/sesman/access.c index 2418505d..b978bf28 100644 --- a/sesman/access.c +++ b/sesman/access.c @@ -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; diff --git a/sesman/access.h b/sesman/access.h index 7705f8bb..a52b1451 100644 --- a/sesman/access.h +++ b/sesman/access.h @@ -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 diff --git a/sesman/auth.h b/sesman/auth.h index 68e677ef..56f78090 100644 --- a/sesman/auth.h +++ b/sesman/auth.h @@ -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 diff --git a/sesman/chansrv/chansrv.c b/sesman/chansrv/chansrv.c index a56b80d9..e2fd2db9 100644 --- a/sesman/chansrv/chansrv.c +++ b/sesman/chansrv/chansrv.c @@ -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; diff --git a/sesman/chansrv/chansrv.h b/sesman/chansrv/chansrv.h index 389f2bd3..e75810c8 100644 --- a/sesman/chansrv/chansrv.h +++ b/sesman/chansrv/chansrv.h @@ -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 diff --git a/sesman/chansrv/chansrv_fuse.c b/sesman/chansrv/chansrv_fuse.c index 04b8fd68..31353ee4 100644 --- a/sesman/chansrv/chansrv_fuse.c +++ b/sesman/chansrv/chansrv_fuse.c @@ -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(); diff --git a/sesman/chansrv/clipboard.c b/sesman/chansrv/clipboard.c index 359a9116..a690e5e2 100644 --- a/sesman/chansrv/clipboard.c +++ b/sesman/chansrv/clipboard.c @@ -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; diff --git a/sesman/chansrv/clipboard.h b/sesman/chansrv/clipboard.h index 449899ba..62108eb3 100644 --- a/sesman/chansrv/clipboard.h +++ b/sesman/chansrv/clipboard.h @@ -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 diff --git a/sesman/chansrv/clipboard_common.h b/sesman/chansrv/clipboard_common.h index 1944b760..312b5df8 100644 --- a/sesman/chansrv/clipboard_common.h +++ b/sesman/chansrv/clipboard_common.h @@ -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 diff --git a/sesman/chansrv/clipboard_file.c b/sesman/chansrv/clipboard_file.c index 338e375a..e8663774 100644 --- a/sesman/chansrv/clipboard_file.c +++ b/sesman/chansrv/clipboard_file.c @@ -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; diff --git a/sesman/chansrv/clipboard_file.h b/sesman/chansrv/clipboard_file.h index a9eb95a0..16377b0e 100644 --- a/sesman/chansrv/clipboard_file.h +++ b/sesman/chansrv/clipboard_file.h @@ -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); diff --git a/sesman/chansrv/devredir.c b/sesman/chansrv/devredir.c index 598d0aa9..629b3cc9 100644 --- a/sesman/chansrv/devredir.c +++ b/sesman/chansrv/devredir.c @@ -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; diff --git a/sesman/chansrv/devredir.h b/sesman/chansrv/devredir.h index cbe279db..5618b39c 100644 --- a/sesman/chansrv/devredir.h +++ b/sesman/chansrv/devredir.h @@ -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); /* diff --git a/sesman/chansrv/drdynvc.c b/sesman/chansrv/drdynvc.c index 3de03f7e..c02bdadb 100644 --- a/sesman/chansrv/drdynvc.c +++ b/sesman/chansrv/drdynvc.c @@ -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; diff --git a/sesman/chansrv/drdynvc.h b/sesman/chansrv/drdynvc.h index 15398867..cd6a5fca 100644 --- a/sesman/chansrv/drdynvc.h +++ b/sesman/chansrv/drdynvc.h @@ -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 diff --git a/sesman/chansrv/irp.h b/sesman/chansrv/irp.h index a13ea8e5..39840a16 100644 --- a/sesman/chansrv/irp.h +++ b/sesman/chansrv/irp.h @@ -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 */ diff --git a/sesman/chansrv/rail.c b/sesman/chansrv/rail.c index 6682cb75..1adacca0 100644 --- a/sesman/chansrv/rail.c +++ b/sesman/chansrv/rail.c @@ -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; diff --git a/sesman/chansrv/rail.h b/sesman/chansrv/rail.h index 3be3a15d..e3facb00 100644 --- a/sesman/chansrv/rail.h +++ b/sesman/chansrv/rail.h @@ -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 diff --git a/sesman/chansrv/smartcard.c b/sesman/chansrv/smartcard.c index f46a839e..d6f23e60 100644 --- a/sesman/chansrv/smartcard.c +++ b/sesman/chansrv/smartcard.c @@ -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) { diff --git a/sesman/chansrv/smartcard.h b/sesman/chansrv/smartcard.h index 3ea503a8..590f8966 100644 --- a/sesman/chansrv/smartcard.h +++ b/sesman/chansrv/smartcard.h @@ -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); /* diff --git a/sesman/chansrv/smartcard_pcsc.c b/sesman/chansrv/smartcard_pcsc.c index f98f30bb..51409567 100644 --- a/sesman/chansrv/smartcard_pcsc.c +++ b/sesman/chansrv/smartcard_pcsc.c @@ -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; diff --git a/sesman/chansrv/smartcard_pcsc.h b/sesman/chansrv/smartcard_pcsc.h index b7ca2183..90e6475b 100644 --- a/sesman/chansrv/smartcard_pcsc.h +++ b/sesman/chansrv/smartcard_pcsc.h @@ -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); diff --git a/sesman/chansrv/sound.c b/sesman/chansrv/sound.c index 31af3e4a..2958e123 100644 --- a/sesman/chansrv/sound.c +++ b/sesman/chansrv/sound.c @@ -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]; diff --git a/sesman/chansrv/sound.h b/sesman/chansrv/sound.h index f3563dab..8227464a 100644 --- a/sesman/chansrv/sound.h +++ b/sesman/chansrv/sound.h @@ -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 diff --git a/sesman/chansrv/xcommon.c b/sesman/chansrv/xcommon.c index 92124407..8abc27f7 100644 --- a/sesman/chansrv/xcommon.c +++ b/sesman/chansrv/xcommon.c @@ -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; diff --git a/sesman/chansrv/xcommon.h b/sesman/chansrv/xcommon.h index 57a7d4fa..ea74b89f 100644 --- a/sesman/chansrv/xcommon.h +++ b/sesman/chansrv/xcommon.h @@ -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 diff --git a/sesman/config.c b/sesman/config.c index c2e565ee..794ff4c2 100644 --- a/sesman/config.c +++ b/sesman/config.c @@ -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) { diff --git a/sesman/config.h b/sesman/config.h index 2baef632..87f489db 100644 --- a/sesman/config.h +++ b/sesman/config.h @@ -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); diff --git a/sesman/env.c b/sesman/env.c index 2a07b873..eabc92c4 100644 --- a/sesman/env.c +++ b/sesman/env.c @@ -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) { diff --git a/sesman/env.h b/sesman/env.h index a7156508..d499b838 100644 --- a/sesman/env.h +++ b/sesman/env.h @@ -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); diff --git a/sesman/libscp/libscp_init.c b/sesman/libscp/libscp_init.c index 7eabd705..b0df86f7 100644 --- a/sesman/libscp/libscp_init.c +++ b/sesman/libscp/libscp_init.c @@ -33,7 +33,7 @@ //struct log_config* s_log; /* server API */ -int DEFAULT_CC +int scp_init(void) { /* diff --git a/sesman/libscp/libscp_init.h b/sesman/libscp/libscp_init.h index 7e74640c..2bf67cb8 100644 --- a/sesman/libscp/libscp_init.h +++ b/sesman/libscp/libscp_init.h @@ -40,7 +40,7 @@ * It this memory needs to be g_free()d * */ -int DEFAULT_CC +int scp_init(void); #endif diff --git a/sesman/libscp/libscp_lock.c b/sesman/libscp/libscp_lock.c index e025882d..23647dcb 100644 --- a/sesman/libscp/libscp_lock.c +++ b/sesman/libscp/libscp_lock.c @@ -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); diff --git a/sesman/libscp/libscp_lock.h b/sesman/libscp/libscp_lock.h index ae2c361b..9f8fd4ed 100644 --- a/sesman/libscp/libscp_lock.h +++ b/sesman/libscp/libscp_lock.h @@ -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 diff --git a/sesman/libscp/libscp_tcp.c b/sesman/libscp/libscp_tcp.c index 86e71956..0fe54f75 100644 --- a/sesman/libscp/libscp_tcp.c +++ b/sesman/libscp/libscp_tcp.c @@ -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); diff --git a/sesman/libscp/libscp_tcp.h b/sesman/libscp/libscp_tcp.h index 1db70797..ceeb6860 100644 --- a/sesman/libscp/libscp_tcp.h +++ b/sesman/libscp/libscp_tcp.h @@ -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 diff --git a/sesman/scp.c b/sesman/scp.c index a6fbc76e..d548052a 100644 --- a/sesman/scp.c +++ b/sesman/scp.c @@ -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; diff --git a/sesman/scp.h b/sesman/scp.h index 1cdfbc4f..c174d3d9 100644 --- a/sesman/scp.h +++ b/sesman/scp.h @@ -39,7 +39,7 @@ * @param socket the connection socket * */ -void* DEFAULT_CC +void* scp_process_start(void* sck); #endif diff --git a/sesman/scp_v0.c b/sesman/scp_v0.c index 9f272719..a6a1060c 100644 --- a/sesman/scp_v0.c +++ b/sesman/scp_v0.c @@ -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; diff --git a/sesman/scp_v0.h b/sesman/scp_v0.h index 8aa6f401..41d6bb7e 100644 --- a/sesman/scp_v0.h +++ b/sesman/scp_v0.h @@ -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 diff --git a/sesman/scp_v1.c b/sesman/scp_v1.c index 517e20d6..74668efc 100644 --- a/sesman/scp_v1.c +++ b/sesman/scp_v1.c @@ -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; diff --git a/sesman/scp_v1.h b/sesman/scp_v1.h index a1d718a7..c7bd72f5 100644 --- a/sesman/scp_v1.h +++ b/sesman/scp_v1.h @@ -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 diff --git a/sesman/scp_v1_mng.c b/sesman/scp_v1_mng.c index d945f2d7..044b35ad 100644 --- a/sesman/scp_v1_mng.c +++ b/sesman/scp_v1_mng.c @@ -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; diff --git a/sesman/scp_v1_mng.h b/sesman/scp_v1_mng.h index 74d4e392..89cacea1 100644 --- a/sesman/scp_v1_mng.h +++ b/sesman/scp_v1_mng.h @@ -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 diff --git a/sesman/sesman.c b/sesman/sesman.c index 01bac015..738421ad 100644 --- a/sesman/sesman.c +++ b/sesman/sesman.c @@ -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; diff --git a/sesman/session.c b/sesman/session.c index 78d9ae9f..06e44cf0 100644 --- a/sesman/session.c +++ b/sesman/session.c @@ -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; diff --git a/sesman/session.h b/sesman/session.h index 04bf4267..4533a1a1 100644 --- a/sesman/session.h +++ b/sesman/session.h @@ -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); /** diff --git a/sesman/sessvc/sessvc.c b/sesman/sessvc/sessvc.c index 3fb80a60..2426b698 100644 --- a/sesman/sessvc/sessvc.c +++ b/sesman/sessvc/sessvc.c @@ -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; diff --git a/sesman/sig.c b/sesman/sig.c index 3ddaa2b2..782e8fe2 100644 --- a/sesman/sig.c +++ b/sesman/sig.c @@ -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; diff --git a/sesman/sig.h b/sesman/sig.h index 17f8f917..0a8494b0 100644 --- a/sesman/sig.h +++ b/sesman/sig.h @@ -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 diff --git a/sesman/tools/sesrun.c b/sesman/tools/sesrun.c index 11a807f1..b9bca988 100644 --- a/sesman/tools/sesrun.c +++ b/sesman/tools/sesrun.c @@ -34,7 +34,7 @@ struct config_sesman g_cfg; /* config.h */ /******************************************************************************/ -int DEFAULT_CC +int main(int argc, char **argv) { int sck; diff --git a/sesman/tools/tcp.c b/sesman/tools/tcp.c index dbb5e178..e6fe7888 100644 --- a/sesman/tools/tcp.c +++ b/sesman/tools/tcp.c @@ -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; diff --git a/sesman/tools/tcp.h b/sesman/tools/tcp.h index 6697c662..e436ccd4 100644 --- a/sesman/tools/tcp.h +++ b/sesman/tools/tcp.h @@ -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 diff --git a/sesman/verify_user.c b/sesman/verify_user.c index e3de9e8f..315fc90f 100644 --- a/sesman/verify_user.c +++ b/sesman/verify_user.c @@ -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; diff --git a/sesman/verify_user_bsd.c b/sesman/verify_user_bsd.c index 3000de99..1e99f567 100644 --- a/sesman/verify_user_bsd.c +++ b/sesman/verify_user_bsd.c @@ -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; diff --git a/sesman/verify_user_kerberos.c b/sesman/verify_user_kerberos.c index 4f58c83a..bf011506 100644 --- a/sesman/verify_user_kerberos.c +++ b/sesman/verify_user_kerberos.c @@ -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; diff --git a/sesman/verify_user_pam.c b/sesman/verify_user_pam.c index 19c76a06..15174c24 100644 --- a/sesman/verify_user_pam.c +++ b/sesman/verify_user_pam.c @@ -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; diff --git a/sesman/verify_user_pam_userpass.c b/sesman/verify_user_pam_userpass.c index 4fa246a5..fc872778 100644 --- a/sesman/verify_user_pam_userpass.c +++ b/sesman/verify_user_pam_userpass.c @@ -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; diff --git a/sesman/xauth.c b/sesman/xauth.c index b95efb39..5f633bba 100644 --- a/sesman/xauth.c +++ b/sesman/xauth.c @@ -33,7 +33,7 @@ /******************************************************************************/ -int DEFAULT_CC +int add_xauth_cookie(int display, const char *file) { FILE *dp; diff --git a/sesman/xauth.h b/sesman/xauth.h index 3254d635..a38d636e 100644 --- a/sesman/xauth.h +++ b/sesman/xauth.h @@ -35,7 +35,7 @@ * @return 0 if adding the cookie is ok */ -int DEFAULT_CC +int add_xauth_cookie(int display, const char *file); #endif |