summaryrefslogtreecommitdiffstats
path: root/sesman
diff options
context:
space:
mode:
authormetalefty <meta@vmeta.jp>2018-04-22 13:45:18 +0900
committerGitHub <noreply@github.com>2018-04-22 13:45:18 +0900
commit39b664fc273e102645966b47b61948f08261959d (patch)
tree9184f6fcd4c7d9590d034ad973a1036cfcfa6c97 /sesman
parent711750f79891cf3fda7b6d8d4a2bc0a8623246bf (diff)
parent7864f9d69235b4b0ce7f03d613f1b523515c9a07 (diff)
downloadxrdp-proprietary-39b664fc273e102645966b47b61948f08261959d.tar.gz
xrdp-proprietary-39b664fc273e102645966b47b61948f08261959d.zip
Merge pull request #1108 from aiden0z/devel
sesrun support start other session based on session_code argument
Diffstat (limited to 'sesman')
-rw-r--r--sesman/tools/sesrun.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sesman/tools/sesrun.c b/sesman/tools/sesrun.c
index b9bca988..57335dd1 100644
--- a/sesman/tools/sesrun.c
+++ b/sesman/tools/sesrun.c
@@ -46,6 +46,7 @@ main(int argc, char **argv)
int height;
int bpp;
int display;
+ int session_code;
struct stream *in_s;
struct stream *out_s;
char *username;
@@ -62,15 +63,17 @@ main(int argc, char **argv)
{
g_printf("xrdp session starter v0.1\n");
g_printf("\nusage:\n");
- g_printf("sesrun <server> <username> <password> <width> <height> <bpp>\n");
+ g_printf("sesrun <server> <username> <password> <width> <height> <bpp> <session_cod>\n");
+ g_printf("session code 0 for Xvnc, 10 for X11RDP, 20 for Xorg\n");
}
- else if (argc == 7)
+ else if (argc == 8)
{
username = argv[2];
password = argv[3];
width = g_atoi(argv[4]);
height = g_atoi(argv[5]);
bpp = g_atoi(argv[6]);
+ session_code = g_atoi(argv[7]);
make_stream(in_s);
init_stream(in_s, 8192);
make_stream(out_s);
@@ -83,7 +86,7 @@ main(int argc, char **argv)
if (g_tcp_connect(sck, argv[1], g_cfg.listen_port) == 0)
{
s_push_layer(out_s, channel_hdr, 8);
- out_uint16_be(out_s, 0); /* code */
+ out_uint16_be(out_s, session_code); /* code */
i = g_strlen(username);
out_uint16_be(out_s, i);
out_uint8a(out_s, username, i);