517 |
// connect |
// connect |
518 |
if (!rdp_connect(g_servername, RDP_LOGON_NORMAL, "", "", "", "")) |
if (!rdp_connect(g_servername, RDP_LOGON_NORMAL, "", "", "", "")) |
519 |
return; |
return; |
|
printf("connected\n"); |
|
520 |
// start notifier |
// start notifier |
521 |
SocketNotifier = new QSocketNotifier(g_sock, QSocketNotifier::Read, MW); |
SocketNotifier = new QSocketNotifier(g_sock, QSocketNotifier::Read, MW); |
522 |
MW->connect(SocketNotifier, SIGNAL(activated(int)), MW, SLOT(dataReceived())); |
MW->connect(SocketNotifier, SIGNAL(activated(int)), MW, SLOT(dataReceived())); |
1248 |
} |
} |
1249 |
|
|
1250 |
/*****************************************************************************/ |
/*****************************************************************************/ |
1251 |
|
void out_params(void) |
1252 |
|
{ |
1253 |
|
fprintf(stderr, "rdesktop: A Remote Desktop Protocol client.\n"); |
1254 |
|
fprintf(stderr, "Version " VERSION ". Copyright (C) 1999-2003 Matt Chapman.\n"); |
1255 |
|
fprintf(stderr, "See http://www.rdesktop.org/ for more information.\n\n"); |
1256 |
|
fprintf(stderr, "Usage: qtrdesktop [options] server\n"); |
1257 |
|
fprintf(stderr, " -g: desktop geometry (WxH)\n"); |
1258 |
|
fprintf(stderr, " -4: use RDP version 4\n"); |
1259 |
|
fprintf(stderr, " -5: use RDP version 5 (default)\n"); |
1260 |
|
fprintf(stderr, " -t: tcp port)\n"); |
1261 |
|
fprintf(stderr, " -a: connection colour depth\n"); |
1262 |
|
fprintf(stderr, " -T: window title\n"); |
1263 |
|
fprintf(stderr, "\n"); |
1264 |
|
} |
1265 |
|
|
1266 |
|
/*****************************************************************************/ |
1267 |
/* produce a hex dump */ |
/* produce a hex dump */ |
1268 |
void hexdump(unsigned char *p, unsigned int len) |
void hexdump(unsigned char *p, unsigned int len) |
1269 |
{ |
{ |
1360 |
char* p; |
char* p; |
1361 |
|
|
1362 |
if (in_argc <= 1) |
if (in_argc <= 1) |
1363 |
|
{ |
1364 |
|
out_params(); |
1365 |
return 0; |
return 0; |
1366 |
|
} |
1367 |
g_argc = in_argc; |
g_argc = in_argc; |
1368 |
g_argv = in_argv; |
g_argv = in_argv; |
1369 |
for (i = 1; i < in_argc; i++) |
for (i = 1; i < in_argc; i++) |