35 |
#include <sys/un.h> /* sockaddr_un */ |
#include <sys/un.h> /* sockaddr_un */ |
36 |
#endif |
#endif |
37 |
|
|
|
#ifdef WITH_OPENSSL |
|
38 |
#include <openssl/md5.h> |
#include <openssl/md5.h> |
|
#else |
|
|
#include "crypto/md5.h" |
|
|
#endif |
|
39 |
|
|
40 |
char g_title[64] = ""; |
char g_title[64] = ""; |
41 |
char g_username[64]; |
char g_username[64]; |
363 |
#endif |
#endif |
364 |
|
|
365 |
while ((c = getopt(argc, argv, |
while ((c = getopt(argc, argv, |
366 |
VNCOPT "u:d:s:c:p:n:k:g:fbBeEmCDKS:T:NX:a:x:Pr:045h?")) != -1) |
VNCOPT "u:d:s:c:p:n:k:g:fbBeEmCDKS:T:NX:a:x:Pr:045h?")) != -1) |
367 |
{ |
{ |
368 |
switch (c) |
switch (c) |
369 |
{ |
{ |
568 |
#ifdef WITH_RDPSND |
#ifdef WITH_RDPSND |
569 |
g_rdpsnd = True; |
g_rdpsnd = True; |
570 |
#else |
#else |
571 |
warning("Not compiled with sound support"); |
warning("Not compiled with sound support\n"); |
572 |
#endif |
#endif |
573 |
|
|
574 |
if (strncmp("off", optarg, 3) == 0) |
if (strncmp("off", optarg, 3) == 0) |
575 |
#ifdef WITH_RDPSND |
#ifdef WITH_RDPSND |
576 |
g_rdpsnd = False; |
g_rdpsnd = False; |
577 |
#else |
#else |
578 |
warning("Not compiled with sound support"); |
warning("Not compiled with sound support\n"); |
579 |
#endif |
#endif |
580 |
|
|
581 |
optarg = p; |
optarg = p; |
586 |
#ifdef WITH_RDPSND |
#ifdef WITH_RDPSND |
587 |
g_rdpsnd = True; |
g_rdpsnd = True; |
588 |
#else |
#else |
589 |
warning("Not compiled with sound support"); |
warning("Not compiled with sound support\n"); |
590 |
#endif |
#endif |
591 |
} |
} |
592 |
} |
} |
716 |
} |
} |
717 |
|
|
718 |
DEBUG(("Disconnecting...\n")); |
DEBUG(("Disconnecting...\n")); |
|
cache_save_state(); |
|
719 |
rdp_disconnect(); |
rdp_disconnect(); |
720 |
|
cache_save_state(); |
721 |
ui_deinit(); |
ui_deinit(); |
722 |
|
|
723 |
if (ext_disc_reason >= 2) |
if (ext_disc_reason >= 2) |
1163 |
{ |
{ |
1164 |
char *home; |
char *home; |
1165 |
char fn[256]; |
char fn[256]; |
1166 |
int fd; |
int fd; |
1167 |
|
|
1168 |
home = getenv("HOME"); |
home = getenv("HOME"); |
1169 |
if (home == NULL) |
if (home == NULL) |
1179 |
void |
void |
1180 |
rd_close_file(int fd) |
rd_close_file(int fd) |
1181 |
{ |
{ |
1182 |
close(fd); |
close(fd); |
1183 |
} |
} |
1184 |
|
|
1185 |
/* read from file*/ |
/* read from file*/ |
1186 |
int |
int |
1187 |
rd_read_file(int fd, void *ptr, int len) |
rd_read_file(int fd, void *ptr, int len) |
1188 |
{ |
{ |
1189 |
return read(fd, ptr, len); |
return read(fd, ptr, len); |
1190 |
} |
} |
1191 |
|
|
1192 |
/* write to file */ |
/* write to file */ |
1193 |
int |
int |
1194 |
rd_write_file(int fd, void* ptr, int len) |
rd_write_file(int fd, void *ptr, int len) |
1195 |
{ |
{ |
1196 |
return write(fd, ptr, len); |
return write(fd, ptr, len); |
1197 |
} |
} |
1198 |
|
|
1199 |
/* move file pointer */ |
/* move file pointer */ |
1200 |
int |
int |
1201 |
rd_lseek_file(int fd, int offset) |
rd_lseek_file(int fd, int offset) |
1202 |
{ |
{ |
1203 |
return lseek(fd, offset, SEEK_SET); |
return lseek(fd, offset, SEEK_SET); |
1204 |
} |
} |
1205 |
|
|
1206 |
/* do a write lock on a file */ |
/* do a write lock on a file */ |