diff options
Diffstat (limited to 'sesman/chansrv')
-rw-r--r-- | sesman/chansrv/chansrv.c | 3 | ||||
-rw-r--r-- | sesman/chansrv/chansrv_fuse.c | 4 | ||||
-rw-r--r-- | sesman/chansrv/clipboard.c | 28 | ||||
-rw-r--r-- | sesman/chansrv/clipboard_file.c | 5 | ||||
-rw-r--r-- | sesman/chansrv/drdynvc.c | 8 | ||||
-rw-r--r-- | sesman/chansrv/rail.c | 36 | ||||
-rw-r--r-- | sesman/chansrv/smartcard.c | 4 | ||||
-rw-r--r-- | sesman/chansrv/smartcard_pcsc.c | 2 | ||||
-rw-r--r-- | sesman/chansrv/sound.c | 2 | ||||
-rw-r--r-- | sesman/chansrv/xcommon.c | 2 |
10 files changed, 49 insertions, 45 deletions
diff --git a/sesman/chansrv/chansrv.c b/sesman/chansrv/chansrv.c index fad2841d..e3d2f5d2 100644 --- a/sesman/chansrv/chansrv.c +++ b/sesman/chansrv/chansrv.c @@ -756,7 +756,6 @@ int DEFAULT_CC my_trans_data_in(struct trans *trans) { struct stream *s = (struct stream *)NULL; - int id = 0; int size = 0; int error = 0; @@ -772,7 +771,7 @@ my_trans_data_in(struct trans *trans) LOGM((LOG_LEVEL_DEBUG, "my_trans_data_in:")); s = trans_get_in_s(trans); - in_uint32_le(s, id); + in_uint8s(s, 4); /* id */ in_uint32_le(s, size); error = trans_force_read(trans, size - 8); diff --git a/sesman/chansrv/chansrv_fuse.c b/sesman/chansrv/chansrv_fuse.c index 7997dfb9..0bb9ceff 100644 --- a/sesman/chansrv/chansrv_fuse.c +++ b/sesman/chansrv/chansrv_fuse.c @@ -39,8 +39,6 @@ //#define USE_SYNC_FLAG -static char g_fuse_mount_name[256] = "xrdp_client"; - /* FUSE mount point */ char g_fuse_root_path[256] = ""; char g_fuse_clipboard_path[256] = ""; /* for clipboard use */ @@ -239,6 +237,8 @@ struct opendir_req struct fuse_file_info *fi; }; +static char g_fuse_mount_name[256] = "xrdp_client"; + FIFO g_fifo_opendir; static struct list *g_req_list = 0; diff --git a/sesman/chansrv/clipboard.c b/sesman/chansrv/clipboard.c index 929805f9..a170dd23 100644 --- a/sesman/chansrv/clipboard.c +++ b/sesman/chansrv/clipboard.c @@ -1697,9 +1697,9 @@ clipboard_event_selection_owner_notify(XEvent *xevent) XFixesSelectionNotifyEvent *lxevent; lxevent = (XFixesSelectionNotifyEvent *)xevent; - log_debug("clipboard_event_selection_owner_notify: %p", lxevent->owner); + log_debug("clipboard_event_selection_owner_notify: 0x%lx", lxevent->owner); log_debug("clipboard_event_selection_owner_notify: " - "window %d subtype %d owner %d g_wnd %d", + "window %ld subtype %d owner %ld g_wnd %ld", lxevent->window, lxevent->subtype, lxevent->owner, g_wnd); if (lxevent->owner == g_wnd) @@ -1735,7 +1735,7 @@ clipboard_get_window_property(Window wnd, Atom prop, Atom *type, int *fmt, Atom ltype; log_debug("clipboard_get_window_property:"); - log_debug(" prop %d name %s", prop, get_atom_text(prop)); + log_debug(" prop %ld name %s", prop, get_atom_text(prop)); lxdata = 0; ltype = 0; XGetWindowProperty(g_display, wnd, prop, 0, 0, 0, @@ -1873,7 +1873,7 @@ clipboard_event_selection_notify(XEvent *xevent) if (rv == 0) { - log_debug("clipboard_event_selection_notify: wnd %p prop %s", + log_debug("clipboard_event_selection_notify: wnd 0x%lx prop %s", lxevent->requestor, get_atom_text(lxevent->property)); rv = clipboard_get_window_property(lxevent->requestor, lxevent->property, @@ -1922,7 +1922,7 @@ clipboard_event_selection_notify(XEvent *xevent) atom = atoms[index]; LOGM((LOG_LEVEL_DEBUG, "clipboard_event_selection_notify: %d %s %d", atom, get_atom_text(atom), XA_STRING)); - log_debug("clipboard_event_selection_notify: 0x%x %s", + log_debug("clipboard_event_selection_notify: 0x%lx %s", atom, get_atom_text(atom)); if (atom == g_utf8_atom) { @@ -1943,15 +1943,15 @@ clipboard_event_selection_notify(XEvent *xevent) } else { - log_error("clipboard_event_selection_notify: unknown atom 0x%x", atom); + log_error("clipboard_event_selection_notify: unknown atom 0x%lx", atom); } } } else { log_error("clipboard_event_selection_notify: error, " - "target is 'TARGETS' and type[%d] or fmt[%d] not right, " - "should be type[%d], fmt[%d]", type, fmt, XA_ATOM, 32); + "target is 'TARGETS' and type[%ld] or fmt[%d] not right, " + "should be type[%ld], fmt[%d]", type, fmt, XA_ATOM, 32); } } else if (lxevent->target == g_utf8_atom) @@ -2138,9 +2138,9 @@ clipboard_event_selection_request(XEvent *xevent) char *xdata; lxev = (XSelectionRequestEvent *)xevent; - log_debug("clipboard_event_selection_request: %p", lxev->property); - log_debug("clipboard_event_selection_request: g_wnd %d, " - ".requestor %d .owner %d .selection %d '%s' .target %d .property %d", + log_debug("clipboard_event_selection_request: 0x%lx", lxev->property); + log_debug("clipboard_event_selection_request: g_wnd %ld, " + ".requestor %ld .owner %ld .selection %ld '%s' .target %ld .property %ld", g_wnd, lxev->requestor, lxev->owner, lxev->selection, get_atom_text(lxev->selection), lxev->target, lxev->property); @@ -2326,8 +2326,8 @@ clipboard_event_property_notify(XEvent *xevent) char *cptr; log_debug("clipboard_event_property_notify:"); - log_debug("clipboard_event_property_notify: PropertyNotify .window %d " - ".state %d .atom %d %s", xevent->xproperty.window, + log_debug("clipboard_event_property_notify: PropertyNotify .window %ld " + ".state %d .atom %ld %s", xevent->xproperty.window, xevent->xproperty.state, xevent->xproperty.atom, get_atom_text(xevent->xproperty.atom)); @@ -2412,7 +2412,7 @@ clipboard_event_property_notify(XEvent *xevent) } else { - log_error("clipboard_event_property_notify: error unknown type %d", + log_error("clipboard_event_property_notify: error unknown type %ld", g_clip_s2c.type); clipboard_send_data_response_failed(); } diff --git a/sesman/chansrv/clipboard_file.c b/sesman/chansrv/clipboard_file.c index 4f3f1ade..562ee82d 100644 --- a/sesman/chansrv/clipboard_file.c +++ b/sesman/chansrv/clipboard_file.c @@ -102,6 +102,7 @@ static int g_file_request_sent_type = 0; #define CB_EPOCH_DIFF 11644473600LL /*****************************************************************************/ +#if 0 static tui64 APP_CC timeval2wintime(struct timeval *tv) { @@ -113,6 +114,7 @@ timeval2wintime(struct timeval *tv) result += tv->tv_usec * 10; return result; } +#endif /*****************************************************************************/ /* this will replace %20 or any hex with the space or correct char @@ -529,7 +531,6 @@ clipboard_process_file_request(struct stream *s, int clip_msg_status, int lindex; int dwFlags; int nPositionLow; - int nPositionHigh; int cbRequested; //int clipDataId; @@ -539,7 +540,7 @@ clipboard_process_file_request(struct stream *s, int clip_msg_status, in_uint32_le(s, lindex); in_uint32_le(s, dwFlags); in_uint32_le(s, nPositionLow); - in_uint32_le(s, nPositionHigh); + in_uint8s(s, 4); /* nPositionHigh */ in_uint32_le(s, cbRequested); //in_uint32_le(s, clipDataId); /* options, used when locking */ if (dwFlags & CB_FILECONTENTS_SIZE) diff --git a/sesman/chansrv/drdynvc.c b/sesman/chansrv/drdynvc.c index 5c20661e..5b9224ca 100644 --- a/sesman/chansrv/drdynvc.c +++ b/sesman/chansrv/drdynvc.c @@ -342,24 +342,24 @@ drdynvc_process_data_first(struct stream *s, unsigned char cmd) uint32_t chan_id; int bytes_in_stream; - int data_len; int Len; drdynvc_get_chan_id(s, cmd, &chan_id); Len = (cmd >> 2) & 0x03; + /* skip data_len */ if (Len == 0) { - in_uint8(s, data_len); + in_uint8s(s, 1); } else if (Len == 1) { - in_uint16_le(s, data_len); + in_uint8s(s, 2); } else { - in_uint32_le(s, data_len); + in_uint8s(s, 4); } bytes_in_stream = stream_length_after_p(s); diff --git a/sesman/chansrv/rail.c b/sesman/chansrv/rail.c index 09f40eba..cad16471 100644 --- a/sesman/chansrv/rail.c +++ b/sesman/chansrv/rail.c @@ -508,7 +508,7 @@ rail_win_popdown(void) window_attributes.map_state == IsViewable && list_index_of(g_window_list, children[i]) >= 0) { - LOG(10, (" dismiss pop up 0x%8.8x", children[i])); + LOG(10, (" dismiss pop up 0x%8.8lx", children[i])); rail_send_key_esc(children[i]); rv = 1; } @@ -756,7 +756,7 @@ rail_win_set_state(Window win, unsigned long state) int old_state; unsigned long data[2] = { state, None }; - LOG(10, (" rail_win_set_state: %d", state)); + LOG(10, (" rail_win_set_state: %ld", state)); /* check whether WM_STATE exists */ old_state = rail_win_get_state(win); if (old_state == -1) @@ -1259,7 +1259,7 @@ rail_win_send_text(Window win) } if (data && len > 0) { - LOG(10, ("chansrv::rail_win_send_text: 0x%8.8x text %s length %d", + LOG(10, ("chansrv::rail_win_send_text: 0x%8.8lx text %s length %d", win, data, len)); make_stream(s); init_stream(s, len + 1024); @@ -1289,7 +1289,7 @@ rail_destroy_window(Window window_id) { struct stream *s; - LOG(10, ("chansrv::rail_destroy_window 0x%8.8x", window_id)); + LOG(10, ("chansrv::rail_destroy_window 0x%8.8lx", window_id)); make_stream(s); init_stream(s, 1024); @@ -1309,7 +1309,7 @@ rail_show_window(Window window_id, int show_state) int flags; struct stream* s; - LOG(10, ("chansrv::rail_show_window 0x%8.8x 0x%x", window_id, show_state)); + LOG(10, ("chansrv::rail_show_window 0x%8.8lx 0x%x", window_id, show_state)); make_stream(s); init_stream(s, 1024); @@ -1351,7 +1351,7 @@ rail_create_window(Window window_id, Window owner_id) struct rail_window_data* rwd; struct stream* s; - LOG(10, ("chansrv::rail_create_window 0x%8.8x", window_id)); + LOG(10, ("chansrv::rail_create_window 0x%8.8lx", window_id)); rwd = rail_get_window_data_safe(window_id); if (rwd == 0) @@ -1507,7 +1507,7 @@ rail_configure_request_window(XConfigureRequestEvent* config) if (mask & CWStackMode) { LOG(10, ("chansrv::rail_configure_request_window: CWStackMode " - "detail 0x%8.8x above 0x%8.8x", config->detail, config->above)); + "detail 0x%8.8x above 0x%8.8lx", config->detail, config->above)); if (config->detail == Above) { LOG(10, ("chansrv::rail_configure_request_window: bring to front " @@ -1808,7 +1808,7 @@ rail_xevent(void *xevent) { case PropertyNotify: prop_name = XGetAtomName(g_display, lxevent->xproperty.atom); - LOG(10, (" got PropertyNotify window_id 0x%8.8x %s state new %d", + LOG(10, (" got PropertyNotify window_id 0x%8.8lx %s state new %d", lxevent->xproperty.window, prop_name, lxevent->xproperty.state == PropertyNewValue)); @@ -1831,7 +1831,7 @@ rail_xevent(void *xevent) break; case ConfigureRequest: - LOG(10, (" got ConfigureRequest window_id 0x%8.8x", lxevent->xconfigurerequest.window)); + LOG(10, (" got ConfigureRequest window_id 0x%8.8lx", lxevent->xconfigurerequest.window)); g_memset(&xwc, 0, sizeof(xwc)); xwc.x = lxevent->xconfigurerequest.x; xwc.y = lxevent->xconfigurerequest.y; @@ -1849,13 +1849,13 @@ rail_xevent(void *xevent) break; case CreateNotify: - LOG(10, (" got CreateNotify window 0x%8.8x parent 0x%8.8x", + LOG(10, (" got CreateNotify window 0x%8.8lx parent 0x%8.8lx", lxevent->xcreatewindow.window, lxevent->xcreatewindow.parent)); rail_select_input(lxevent->xcreatewindow.window); break; case DestroyNotify: - LOG(10, (" got DestroyNotify window 0x%8.8x event 0x%8.8x", + LOG(10, (" got DestroyNotify window 0x%8.8lx event 0x%8.8lx", lxevent->xdestroywindow.window, lxevent->xdestroywindow.event)); if (lxevent->xdestroywindow.window != lxevent->xdestroywindow.event) { @@ -1871,12 +1871,12 @@ rail_xevent(void *xevent) break; case MapRequest: - LOG(10, (" got MapRequest window 0x%8.8x", lxevent->xmaprequest.window)); + LOG(10, (" got MapRequest window 0x%8.8lx", lxevent->xmaprequest.window)); XMapWindow(g_display, lxevent->xmaprequest.window); break; case MapNotify: - LOG(10, (" got MapNotify window 0x%8.8x event 0x%8.8x", + LOG(10, (" got MapNotify window 0x%8.8lx event 0x%8.8lx", lxevent->xmap.window, lxevent->xmap.event)); if (lxevent->xmap.window != lxevent->xmap.event) { @@ -1902,7 +1902,7 @@ rail_xevent(void *xevent) break; case UnmapNotify: - LOG(10, (" got UnmapNotify 0x%8.8x", lxevent->xunmap.event)); + LOG(10, (" got UnmapNotify 0x%8.8lx", lxevent->xunmap.event)); if (lxevent->xunmap.window != lxevent->xunmap.event) { break; @@ -1910,7 +1910,7 @@ rail_xevent(void *xevent) if (is_window_valid_child_of_root(lxevent->xunmap.window)) { index = list_index_of(g_window_list, lxevent->xunmap.window); - LOG(10, (" window 0x%8.8x is unmapped", lxevent->xunmap.window)); + LOG(10, (" window 0x%8.8lx is unmapped", lxevent->xunmap.window)); if (index >= 0) { XGetWindowAttributes(g_display, lxevent->xunmap.window, &wnd_attributes); @@ -1929,7 +1929,7 @@ rail_xevent(void *xevent) break; case ConfigureNotify: - LOG(10, (" got ConfigureNotify 0x%8.8x event 0x%8.8x", lxevent->xconfigure.window, + LOG(10, (" got ConfigureNotify 0x%8.8lx event 0x%8.8lx", lxevent->xconfigure.window, lxevent->xconfigure.event)); rv = 0; if (lxevent->xconfigure.event != lxevent->xconfigure.window || @@ -1975,8 +1975,8 @@ rail_xevent(void *xevent) break; case ReparentNotify: - LOG(10, (" got ReparentNotify window 0x%8.8x parent 0x%8.8x " - "event 0x%8.8x x %d y %d override redirect %d", + LOG(10, (" got ReparentNotify window 0x%8.8lx parent 0x%8.8lx " + "event 0x%8.8lx x %d y %d override redirect %d", lxevent->xreparent.window, lxevent->xreparent.parent, lxevent->xreparent.event, lxevent->xreparent.x, lxevent->xreparent.y, lxevent->xreparent.override_redirect)); diff --git a/sesman/chansrv/smartcard.c b/sesman/chansrv/smartcard.c index a07e36eb..02a30d1a 100644 --- a/sesman/chansrv/smartcard.c +++ b/sesman/chansrv/smartcard.c @@ -1854,8 +1854,8 @@ scard_send_Transmit(IRP *irp, char *context, int context_bytes, } log_debug("send_bytes %d recv_bytes %d send dwProtocol %d cbPciLength %d " - "extra_bytes %d recv dwProtocol %d cbPciLength %d", send_bytes, - recv_bytes, send_ior->dwProtocol, send_ior->cbPciLength, + "extra_bytes %d recv dwProtocol %d cbPciLength %d extra_bytes %d", + send_bytes, recv_bytes, send_ior->dwProtocol, send_ior->cbPciLength, send_ior->extra_bytes, recv_ior->dwProtocol, recv_ior->cbPciLength, recv_ior->extra_bytes); diff --git a/sesman/chansrv/smartcard_pcsc.c b/sesman/chansrv/smartcard_pcsc.c index 9824432e..bf3d11bb 100644 --- a/sesman/chansrv/smartcard_pcsc.c +++ b/sesman/chansrv/smartcard_pcsc.c @@ -259,7 +259,7 @@ free_uds_client(struct pcsc_uds_client *uds_client) } list_delete(context->cards); } - LLOGLN(10, (" left over context 0x%8.8x", context->context)); + LLOGLN(10, (" left over context %p", context->context)); scard_send_cancel(0, context->context, context->context_bytes); scard_send_release_context(0, context->context, context->context_bytes); diff --git a/sesman/chansrv/sound.c b/sesman/chansrv/sound.c index a0899f67..66108651 100644 --- a/sesman/chansrv/sound.c +++ b/sesman/chansrv/sound.c @@ -103,6 +103,7 @@ static struct xr_wave_format_ex g_pcm_44100 = g_pcm_44100_data /* data */ }; +#if defined(XRDP_OPUS) static char g_opus_44100_data[] = { 0 }; static struct xr_wave_format_ex g_opus_44100 = { @@ -115,6 +116,7 @@ static struct xr_wave_format_ex g_opus_44100 = 0, /* data size */ g_opus_44100_data /* data */ }; +#endif #if defined(XRDP_OPUS) diff --git a/sesman/chansrv/xcommon.c b/sesman/chansrv/xcommon.c index d6d2d4b4..9aae4a06 100644 --- a/sesman/chansrv/xcommon.c +++ b/sesman/chansrv/xcommon.c @@ -63,11 +63,13 @@ xcommon_error_handler(Display *dis, XErrorEvent *xer) /* The X server had an internal error. This is the last function called. 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 xcommon_fatal_handler(Display *dis) { return 0; } +#endif /*****************************************************************************/ /* returns time in milliseconds |