214 |
strcpy(title, "rdesktop - "); |
strcpy(title, "rdesktop - "); |
215 |
strncat(title, server, sizeof(title) - sizeof("rdesktop - ")); |
strncat(title, server, sizeof(title) - sizeof("rdesktop - ")); |
216 |
|
|
217 |
|
if (!rdp_connect(server, flags, domain, password, shell, directory)) |
218 |
|
return 1; |
219 |
|
|
220 |
|
printf("Connection successful.\n"); |
221 |
|
|
222 |
if (ui_create_window(title)) |
if (ui_create_window(title)) |
223 |
{ |
{ |
|
if (!rdp_connect(server, flags, domain, password, shell, |
|
|
directory)) |
|
|
return 1; |
|
|
|
|
|
printf("Connection successful.\n"); |
|
224 |
rdp_main_loop(); |
rdp_main_loop(); |
|
printf("Disconnecting...\n"); |
|
225 |
ui_destroy_window(); |
ui_destroy_window(); |
|
rdp_disconnect(); |
|
226 |
} |
} |
227 |
|
|
228 |
|
printf("Disconnecting...\n"); |
229 |
|
rdp_disconnect(); |
230 |
return 0; |
return 0; |
231 |
} |
} |
232 |
|
|