Use symbolic names for static virtual channel name strings
This commit is contained in:
@@ -77,6 +77,11 @@
|
|||||||
/* Channel definition structure CHANNEL_DEF (2.2.1.3.4.1) */
|
/* Channel definition structure CHANNEL_DEF (2.2.1.3.4.1) */
|
||||||
/* This isn't explicitly named in MS-RDPBCGR */
|
/* This isn't explicitly named in MS-RDPBCGR */
|
||||||
#define CHANNEL_NAME_LEN 7
|
#define CHANNEL_NAME_LEN 7
|
||||||
|
/* These names are also not explicitly defined in MS-RDPBCGR */
|
||||||
|
#define CLIPRDR_SVC_CHANNEL_NAME "cliprdr"
|
||||||
|
#define RAIL_SVC_CHANNEL_NAME "rail"
|
||||||
|
#define RDPSND_SVC_CHANNEL_NAME "rdpsnd"
|
||||||
|
#define RDPDR_SVC_CHANNEL_NAME "rdpdr"
|
||||||
|
|
||||||
/* 2.2.1.3.6 Client Monitor Data - */
|
/* 2.2.1.3.6 Client Monitor Data - */
|
||||||
/* monitorCount (4 bytes): A 32-bit, unsigned integer. The number of display */
|
/* monitorCount (4 bytes): A 32-bit, unsigned integer. The number of display */
|
||||||
|
|||||||
@@ -365,23 +365,23 @@ process_message_channel_setup(struct stream *s)
|
|||||||
LOG_DEVEL(LOG_LEVEL_DEBUG, "process_message_channel_setup: chan name '%s' "
|
LOG_DEVEL(LOG_LEVEL_DEBUG, "process_message_channel_setup: chan name '%s' "
|
||||||
"id %d flags %8.8x", ci->name, ci->id, ci->flags);
|
"id %d flags %8.8x", ci->name, ci->id, ci->flags);
|
||||||
|
|
||||||
if (g_strcasecmp(ci->name, "cliprdr") == 0)
|
if (g_strcasecmp(ci->name, CLIPRDR_SVC_CHANNEL_NAME) == 0)
|
||||||
{
|
{
|
||||||
g_cliprdr_index = g_num_chan_items;
|
g_cliprdr_index = g_num_chan_items;
|
||||||
g_cliprdr_chan_id = ci->id;
|
g_cliprdr_chan_id = ci->id;
|
||||||
}
|
}
|
||||||
else if (g_strcasecmp(ci->name, "rdpsnd") == 0)
|
else if (g_strcasecmp(ci->name, RDPSND_SVC_CHANNEL_NAME) == 0)
|
||||||
{
|
{
|
||||||
g_rdpsnd_index = g_num_chan_items;
|
g_rdpsnd_index = g_num_chan_items;
|
||||||
g_rdpsnd_chan_id = ci->id;
|
g_rdpsnd_chan_id = ci->id;
|
||||||
}
|
}
|
||||||
else if (g_strcasecmp(ci->name, "rdpdr") == 0)
|
else if (g_strcasecmp(ci->name, RDPDR_SVC_CHANNEL_NAME) == 0)
|
||||||
{
|
{
|
||||||
g_rdpdr_index = g_num_chan_items;
|
g_rdpdr_index = g_num_chan_items;
|
||||||
g_rdpdr_chan_id = ci->id;
|
g_rdpdr_chan_id = ci->id;
|
||||||
}
|
}
|
||||||
/* disabled for now */
|
/* disabled for now */
|
||||||
else if (g_strcasecmp(ci->name, "rail") == 0)
|
else if (g_strcasecmp(ci->name, RAIL_SVC_CHANNEL_NAME) == 0)
|
||||||
{
|
{
|
||||||
g_rail_index = g_num_chan_items;
|
g_rail_index = g_num_chan_items;
|
||||||
g_rail_chan_id = ci->id;
|
g_rail_chan_id = ci->id;
|
||||||
|
|||||||
+1
-1
@@ -1047,7 +1047,7 @@ vnc_clip_process_rfb_data(struct vnc *v)
|
|||||||
int
|
int
|
||||||
vnc_clip_open_clip_channel(struct vnc *v)
|
vnc_clip_open_clip_channel(struct vnc *v)
|
||||||
{
|
{
|
||||||
v->clip_chanid = v->server_get_channel_id(v, "cliprdr");
|
v->clip_chanid = v->server_get_channel_id(v, CLIPRDR_SVC_CHANNEL_NAME);
|
||||||
|
|
||||||
if (v->server_chansrv_in_use(v))
|
if (v->server_chansrv_in_use(v))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user