193 |
" 'PRIMARYCLIPBOARD' looks at both PRIMARY and CLIPBOARD\n"); |
" 'PRIMARYCLIPBOARD' looks at both PRIMARY and CLIPBOARD\n"); |
194 |
fprintf(stderr, " when sending data to server.\n"); |
fprintf(stderr, " when sending data to server.\n"); |
195 |
fprintf(stderr, " 'CLIPBOARD' looks at only CLIPBOARD.\n"); |
fprintf(stderr, " 'CLIPBOARD' looks at only CLIPBOARD.\n"); |
196 |
|
#ifdef WITH_SCARD |
197 |
|
fprintf(stderr, " '-r scard[:\"Scard Name\"=\"Alias Name[;Vendor Name]\"[,...]]\n"); |
198 |
|
fprintf(stderr, " example: -r scard:\"eToken PRO 00 00\"=\"AKS ifdh 0\"\n"); |
199 |
|
fprintf(stderr, |
200 |
|
" \"eToken PRO 00 00\" -> Device in Linux/Unix enviroment\n"); |
201 |
|
fprintf(stderr, |
202 |
|
" \"AKS ifdh 0\" -> Device shown in Windows enviroment \n"); |
203 |
|
fprintf(stderr, " example: -r scard:\"eToken PRO 00 00\"=\"AKS ifdh 0;AKS\"\n"); |
204 |
|
fprintf(stderr, |
205 |
|
" \"eToken PRO 00 00\" -> Device in Linux/Unix enviroment\n"); |
206 |
|
fprintf(stderr, |
207 |
|
" \"AKS ifdh 0\" -> Device shown in Windows enviroment \n"); |
208 |
|
fprintf(stderr, |
209 |
|
" \"AKS\" -> Device vendor name \n"); |
210 |
|
#endif |
211 |
fprintf(stderr, " -0: attach to console\n"); |
fprintf(stderr, " -0: attach to console\n"); |
212 |
fprintf(stderr, " -4: use RDP version 4\n"); |
fprintf(stderr, " -4: use RDP version 4\n"); |
213 |
fprintf(stderr, " -5: use RDP version 5 (default)\n"); |
fprintf(stderr, " -5: use RDP version 5 (default)\n"); |
423 |
BOOL geometry_option = False; |
BOOL geometry_option = False; |
424 |
int run_count = 0; /* Session Directory support */ |
int run_count = 0; /* Session Directory support */ |
425 |
BOOL continue_connect = True; /* Session Directory support */ |
BOOL continue_connect = True; /* Session Directory support */ |
426 |
|
char *rdpsnd_optarg = NULL; |
427 |
|
|
428 |
#ifdef HAVE_LOCALE_H |
#ifdef HAVE_LOCALE_H |
429 |
/* Set locale according to environment */ |
/* Set locale according to environment */ |
685 |
if (str_startswith(optarg, "local")) |
if (str_startswith(optarg, "local")) |
686 |
#ifdef WITH_RDPSND |
#ifdef WITH_RDPSND |
687 |
{ |
{ |
688 |
char *driver = NULL, *options = |
rdpsnd_optarg = |
689 |
NULL; |
next_arg(optarg, ':'); |
|
|
|
|
if ((driver = |
|
|
next_arg(optarg, ':'))) |
|
|
{ |
|
|
if (!strlen(driver)) |
|
|
{ |
|
|
driver = NULL; |
|
|
} |
|
|
else if ((options = |
|
|
next_arg(driver, |
|
|
':'))) |
|
|
{ |
|
|
if (!strlen |
|
|
(options)) |
|
|
options = |
|
|
NULL; |
|
|
} |
|
|
} |
|
|
|
|
690 |
g_rdpsnd = True; |
g_rdpsnd = True; |
|
if (!rdpsnd_select_driver |
|
|
(driver, options)) |
|
|
{ |
|
|
warning("Driver not available\n"); |
|
|
} |
|
691 |
} |
} |
692 |
|
|
693 |
#else |
#else |
708 |
{ |
{ |
709 |
#ifdef WITH_RDPSND |
#ifdef WITH_RDPSND |
710 |
g_rdpsnd = True; |
g_rdpsnd = True; |
|
if (!rdpsnd_select_driver(NULL, NULL)) |
|
|
{ |
|
|
warning("No sound-driver available\n"); |
|
|
} |
|
711 |
#else |
#else |
712 |
warning("Not compiled with sound support\n"); |
warning("Not compiled with sound support\n"); |
713 |
#endif |
#endif |
755 |
else |
else |
756 |
g_rdpclip = True; |
g_rdpclip = True; |
757 |
} |
} |
758 |
|
else if (strncmp("scard", optarg, 5) == 0) |
759 |
|
{ |
760 |
|
#ifdef WITH_SCARD |
761 |
|
scard_enum_devices(&g_num_devices, optarg + 5); |
762 |
|
#else |
763 |
|
warning("Not compiled with smartcard support\n"); |
764 |
|
#endif |
765 |
|
} |
766 |
else |
else |
767 |
{ |
{ |
768 |
warning("Unknown -r argument\n\n\tPossible arguments are: comport, disk, lptport, printer, sound, clipboard\n"); |
warning("Unknown -r argument\n\n\tPossible arguments are: comport, disk, lptport, printer, sound, clipboard, scard\n"); |
769 |
} |
} |
770 |
break; |
break; |
771 |
|
|
910 |
|
|
911 |
#ifdef WITH_RDPSND |
#ifdef WITH_RDPSND |
912 |
if (g_rdpsnd) |
if (g_rdpsnd) |
913 |
rdpsnd_init(); |
{ |
914 |
|
if (!rdpsnd_init(rdpsnd_optarg)) |
915 |
|
{ |
916 |
|
warning("Initializing sound-support failed!\n"); |
917 |
|
} |
918 |
|
} |
919 |
#endif |
#endif |
920 |
|
|
921 |
if (lspci_enabled) |
if (lspci_enabled) |
1102 |
return mem; |
return mem; |
1103 |
} |
} |
1104 |
|
|
1105 |
|
/* Exit on NULL pointer. Use to verify result from XGetImage etc */ |
1106 |
|
void |
1107 |
|
exit_if_null(void *ptr) |
1108 |
|
{ |
1109 |
|
if (ptr == NULL) |
1110 |
|
{ |
1111 |
|
error("unexpected null pointer. Out of memory?\n"); |
1112 |
|
exit(1); |
1113 |
|
} |
1114 |
|
} |
1115 |
|
|
1116 |
/* strdup */ |
/* strdup */ |
1117 |
char * |
char * |
1118 |
xstrdup(const char *s) |
xstrdup(const char *s) |