This commit is contained in:
Michael Jumper
2010-11-25 21:01:34 -08:00
parent b2d49c9d21
commit 2bbf8b3752
2 changed files with 5 additions and 1 deletions

View File

@@ -120,6 +120,7 @@ guac_client* guac_get_client(int client_fd) {
if (!(client->client_plugin_handle)) { if (!(client->client_plugin_handle)) {
syslog(LOG_ERR, "Could not open client plugin for protocol \"%s\": %s\n", protocol, dlerror()); syslog(LOG_ERR, "Could not open client plugin for protocol \"%s\": %s\n", protocol, dlerror());
guac_send_error(io, "Could not load server-side client plugin."); guac_send_error(io, "Could not load server-side client plugin.");
guac_flush(io);
guac_free_instruction_data(&instruction); guac_free_instruction_data(&instruction);
return NULL; return NULL;
} }
@@ -132,6 +133,7 @@ guac_client* guac_get_client(int client_fd) {
if ((error = dlerror()) != NULL) { if ((error = dlerror()) != NULL) {
syslog(LOG_ERR, "Could not get guac_client_init in plugin: %s\n", error); syslog(LOG_ERR, "Could not get guac_client_init in plugin: %s\n", error);
guac_send_error(io, "Invalid server-side client plugin."); guac_send_error(io, "Invalid server-side client plugin.");
guac_flush(io);
guac_free_instruction_data(&instruction); guac_free_instruction_data(&instruction);
return NULL; return NULL;
} }
@@ -141,8 +143,8 @@ guac_client* guac_get_client(int client_fd) {
argv = instruction.argv; argv = instruction.argv;
if (alias.client_init(client, argc, argv) != 0) { if (alias.client_init(client, argc, argv) != 0) {
/* NOTE: On error, proxy client will send appropriate error message */
guac_free_instruction_data(&instruction); guac_free_instruction_data(&instruction);
guac_send_error(io, "Error initializing server-side client.");
return NULL; return NULL;
} }

View File

@@ -297,6 +297,7 @@ int guac_client_init(guac_client* client, int argc, char** argv) {
if (argc < 3) { if (argc < 3) {
guac_send_error(client->io, "VNC client requires hostname and port arguments"); guac_send_error(client->io, "VNC client requires hostname and port arguments");
guac_flush(client->io);
return 1; return 1;
} }
@@ -330,6 +331,7 @@ int guac_client_init(guac_client* client, int argc, char** argv) {
/* Connect */ /* Connect */
if (!rfbInitClient(rfb_client, NULL, NULL)) { if (!rfbInitClient(rfb_client, NULL, NULL)) {
guac_send_error(client->io, "Error initializing VNC client"); guac_send_error(client->io, "Error initializing VNC client");
guac_flush(client->io);
return 1; return 1;
} }