From a2b072995390e9359e1c2567fc590a0bd9cdb1f9 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sun, 20 Mar 2011 21:38:58 -0700 Subject: [PATCH] Wait for output thread if input thread does not start, fixed typo in error. --- libguac/src/client.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libguac/src/client.c b/libguac/src/client.c index 3c2e29ac..41045e95 100644 --- a/libguac/src/client.c +++ b/libguac/src/client.c @@ -182,7 +182,7 @@ guac_client* guac_get_client(int client_fd) { client_args = (const char**) dlsym(client->client_plugin_handle, "GUAC_CLIENT_ARGS"); if ((error = dlerror()) != NULL) { - guac_log_error("Could not get GUAC_CLIENT_ in plugin: %s\n", error); + guac_log_error("Could not get GUAC_CLIENT_ARGS in plugin: %s\n", error); guac_send_error(io, "Invalid server-side client plugin."); guac_flush(io); guac_close(io); @@ -397,6 +397,8 @@ int guac_start_client(guac_client* client) { } if (pthread_create(&input_thread, NULL, __guac_client_input_thread, (void*) client)) { + guac_client_stop(client); + pthread_join(output_thread, NULL); return -1; }